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.
layout.tsx
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)