# Internationalization and Localization

<details>

<summary>Prerequisites</summary>

This example specifically requires completion of all setup steps listed on the following White Label sub-pages:

1. [Prerequisites](https://gdplabs.gitbook.io/glchat/sdk/resources/white-label/prerequisites) page.
2. [Installation](https://gdplabs.gitbook.io/glchat/sdk/resources/white-label/installation) page.

</details>

GLChat UI uses JSON files to store translations. By default, GLChat UI supports English (`en`) and Indonesian (`id`).

Translation list for `en`  (this is a TypeScript file):

{% file src="<https://1470748636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDY50EL4OmcrPvtoecg4h%2Fuploads%2FNpzOlQYy8NZWDlB9evVu%2Fen.ts?alt=media&token=d3bd8f72-e1c9-4e95-938e-a5157e79241c>" %}

Translation list for `id`:

{% file src="<https://1470748636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDY50EL4OmcrPvtoecg4h%2Fuploads%2FolQpPRDnAMTRZK4obXCP%2Fid.ts?alt=media&token=474d2f91-373a-42e3-829e-5e32d0ada4a9>" %}

You can override the translation by providing your own JSON file. For example, you can create the following JSON file to change the copywriting for disclaimer section.

```json
{
  "en": {
    "error": {
      "badRequest": {
        "title": "We're sorry but there's been an error",
        "description": "We couldn't process your request. Please try again.",
        "button": "Retry here"
      }
    }
  },
  "id": {
    "error": {
      "badRequest": {
        "title": "Ada masalah",
        "description": "Kami tidak dapat memproses permintaan tersebut. Silakan coba lagi.",
        "button": "Ulangi lagi"
      }
    }
  }
}
```

To make GLChat UI use the above JSON file, host it in a URL accessible by GLChat UI container image and then add the following environment variable into GLChat UI docker container:

```bash
# Adjust http://localhost:8080/i18n.json with your actual URL that returns the JSON file
CUSTOM_I18N_URL=http://localhost:8080/i18n.json
```

If you recreate the GLChat UI docker container and visit `http://localhost:3000` you will see that the copy writing has changed:

<figure><img src="https://1470748636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDY50EL4OmcrPvtoecg4h%2Fuploads%2FxtVuBVOTnN0NiiA1CLgP%2Fimage.png?alt=media&#x26;token=02b458b8-83fe-458e-817d-e7844bf90370" alt=""><figcaption></figcaption></figure>

If you want to check the `id` translation, visit `http://localhost:3000/id` .
