# Languages and Localization

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.

### 1. Enable a Supported Language

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.

<details>

<summary>Expand to see supported languages</summary>

**Built-in Translation**

Translations for these languages are provided out of the box.

* Chinese (Hong Kong)
* Chinese (Simplified)
* Chinese (Traditional)
* Dutch
* English
* Filipino
* French
* German
* Greek
* Indonesian
* Italian
* Japanese
* Korean
* Malay
* Polish
* Portuguese
* Portuguese (Brazil)
* Portuguese (Portugal)
* Spanish
* Spanish (Latin America)
* Spanish (Spain)
* Thai
* Vietnamese

**Custom Translation**

Requires you to provide your own translation. Enable a language and customize the translation in Custom Text and Email/SMS Template.

* Afrikaans
* Amharic
* Arabic
* Armenian
* Azerbaijani
* Basque
* Belarusian
* Bengali
* Bulgarian
* Burmese
* Catalan
* Croatian
* Czech
* Danish
* Estonian
* Finnish
* Galician
* Georgian
* Hindi
* Hungarian
* Icelandic
* Kannada
* Khmer
* Kyrgyz
* Lao
* Latvian
* Lithuanian
* Macedonian
* Malayalam
* Marathi
* Mongolian
* Nepali
* Norwegian
* Persian
* Romanian
* Russian
* Serbian
* Sinhala
* Slovak
* Slovenian
* Swahili
* Swedish
* Tamil
* Telugu
* Turkish
* Ukrainian
* Zulu

</details>

<figure><img src="https://2638622528-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAjXpMovvVxeIY33s_K%2Fuploads%2Fgit-blob-9756c2618ba1292ba47b513ec5e8c64e9631f3e1%2Fauthgear-languages.png?alt=media" alt=""><figcaption></figcaption></figure>

### 2. Set Primary Language

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.

### 3. Add More Languages

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.

<figure><img src="https://2638622528-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAjXpMovvVxeIY33s_K%2Fuploads%2Fgit-blob-8b6019b568d52c264c171610ea8566f7d8409171%2Fauthgear-custom-language-list.png?alt=media" alt=""><figcaption></figcaption></figure>

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](https://github.com/authgear/authgear-server/blob/2a6f1bfbb9b8/resources/authgear/templates/en/translation.json) in the **translation.json** text field to translate different UI texts for the language. See [Custom Text](https://docs.authgear.com/customization/built-in-ui/localization) to learn more about editing **translation.json**.

<figure><img src="https://2638622528-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MAjXpMovvVxeIY33s_K%2Fuploads%2Fgit-blob-4b575916b98f03b316bf7fd31665c9698ce9115a%2Fauthgear-custom-text-cz-example.png?alt=media" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.authgear.com/customization/built-in-ui/languages-and-localization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
