Languages and Localization
Change the default language for your Authgear project.
Last updated
Change the default language for your Authgear project.
Last updated
Out of the box, Authgear provides multiple languages that your application can display. If a language you wish to use is not in the list of built-in languages, you can still add your own translation.json to add support for the language.
Authgear will display text in a language based on your user's locale. In case the user's locale does not match any of the available languages for your project, the primary language will be used.
In this guide, you'll learn how to enable a supported language, set the primary language for your project, and add more languages using custom translation.
To access the Language settings for your project, navigate to the Languages section in the Authgear Portal.
You must enable a language before you can set it as a primary language or customize it. To enable a language, go to the Languages section in the portal, scroll to the language (built-in or custom translation), and check the box next to it. Finally, click on the Save button on the top left corner of the screen to keep your changes.
The primary language is the language that will be displayed when a user's locale does not match any of the supported languages.
Use the Language dropdown in the Primary Language subsection of Languages in the portal to set your project's primary language.
You can add more languages using custom translation.json. To do this, first enable the language from the Custom Translation subsection of Languages in the portal. For example, enable a language such as Czech, Danish, or Estonian from the custom translation subsection and then proceed to write the translation.
Next, go to Branding > Custom Text in Authgear Portal. Then, select the language you wish to add from the dropdown at the top right corner.
Enter the appropriate key-value pair in the translation.json text field to translate different UI texts for the language. See Custom Text to learn more about editing translation.json.