stack/docs/templates/customization/internationalization.mdx
Madison 4e467c4026
New docs (#698)
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
Co-authored-by: Madison Kennedy <madison@Madisons-MacBook-Pro.local>
Co-authored-by: BilalG1 <bg2002@gmail.com>
2025-06-20 13:30:01 -07:00

38 lines
1.2 KiB
Plaintext

---
title: Internationalization
---
Internationalization (i18n) allows your application to support multiple languages, making it accessible to users worldwide. Stack Auth provides built-in internationalization support for its components, enabling you to offer a localized authentication experience with minimal effort.
## Setup
Internationalization with Stack is very straightforward. Simply pass the `lang` prop to the `StackProvider` component, and all the pages will be translated to the specified language.
```jsx title="layout.tsx"
...
<StackProvider ... lang={'de-DE'}>
...
</StackProvider>
...
```
By default, if no language is provided, it will be set to `en-US`.
You can choose which languages to use by employing your own methods, such as storing the language in `localStorage` or using the user's browser language.
## Supported languages
- `en-US`: English (United States)
- `de-DE`: German (Germany)
- `es-419`: Spanish (Latin America)
- `es-ES`: Spanish (Spain)
- `fr-CA`: French (Canada)
- `fr-FR`: French (France)
- `it-IT`: Italian (Italy)
- `pt-BR`: Portuguese (Brazil)
- `pt-PT`: Portuguese (Portugal)
- `zh-CN`: Chinese (China)
- `zh-TW`: Chinese (Taiwan)
- `ja-JP`: Japanese (Japan)
- `ko-KR`: Korean (South Korea)