# Localization

<!-- AI-AGENT-NOTE: An interactive demo is embedded here but is not represented in this Markdown file. If you need to see it in action, open this page in a browser (e.g. via a browser-automation MCP like Chrome DevTools or Playwright), or let the user know a live demo is available on this page. -->

The default language of the UI is English, but you can choose from over 40 supported languages. If you want to use another language, you have to load its language resources file. Depending on the method of installation, you might want to load language resources using [CDN](#cdn), [npm](#npm), or [Zip package](#zip-package). The language can be then set using the [`language`](configuration-options.md#language) configuration option.

In the example below, CKBox is configured to use Spanish.

```js
CKBox.mount(document.querySelector('#ckbox'), {
	tokenUrl: 'https://your.token.url',
	language: 'es'
});
```

<!-- AI-AGENT-NOTE: An interactive demo is embedded here but is not represented in this Markdown file. If you need to see it in action, open this page in a browser (e.g. via a browser-automation MCP like Chrome DevTools or Playwright), or let the user know a live demo is available on this page. -->

<a id="including-language-files">

## Including language files

<a id="cdn">

### CDN

If you use CDN, additional language files can be loaded together with CKBox. Use the following URL format to load the language script:\
`https://cdn.ckbox.io/ckbox/2.13.1/translations/[lang-code].js`

```html
<script src="https://cdn.ckbox.io/ckbox/2.13.1/ckbox.js"></script>
<script src="https://cdn.ckbox.io/ckbox/2.13.1/translations/es.js"></script>
```

<a id="npm">

### npm

If you use CKBox as an `npm` dependency, you can `import` the required languages in your application using the following pattern: `import 'ckbox/dist/translations/[lang-code]';`.

```js
import * as CKBox from 'ckbox';
import 'ckbox/dist/styles/ckbox.css';
import 'ckbox/dist/translations/es';

CKBox.mount(document.querySelector('#ckbox'), {
	tokenUrl: 'https://your.token.url',
	language: 'es',
});
```

Please note that in this case, it’s still possible to load languages dynamically using the `<script>` tag.

<a id="zip-package">

### Zip package

In the Zip package, language files are located in the `ckbox/translations` folder and can be loaded together with the CKBox script:

```html
<script src="ckbox/ckbox.js"></script>
<script src="ckbox/translations/[lang-code].js"></script>
```

<a id="list-of-supported-languages">

## List of supported languages

| Language                | Code    |
| ----------------------- | ------- |
| Bengali                 | `bn`    |
| Bulgarian               | `bg`    |
| Catalan                 | `ca`    |
| Chinese (Simplified)    | `zh`    |
| Chinese (Traditional)   | `zh-tw` |
| Czech                   | `cs`    |
| Danish                  | `da`    |
| Dutch                   | `nl`    |
| English                 | `en`    |
| Estonian                | `et`    |
| Finnish                 | `fi`    |
| French                  | `fr`    |
| French (Canada)         | `fr-ca` |
| German                  | `de`    |
| Greek                   | `el`    |
| Hindi                   | `hi`    |
| Hungarian               | `hu`    |
| Indonesian              | `id`    |
| Italian                 | `it`    |
| Japanese                | `ja`    |
| Korean                  | `ko`    |
| Latvian                 | `lv`    |
| Lithuanian              | `lt`    |
| Malay                   | `ms`    |
| Marathi                 | `mr`    |
| Norwegian               | `no`    |
| Polish                  | `pl`    |
| Portuguese (Brazil)     | `pt-br` |
| Portuguese (Europe)     | `pt`    |
| Romanian                | `ro`    |
| Russian                 | `ru`    |
| Serbian                 | `sr`    |
| Slovak                  | `sk`    |
| Spanish (Spain)         | `es`    |
| Spanish (Latin America) | `es-la` |
| Spanish (Mexico)        | `es-mx` |
| Swedish                 | `sv`    |
| Thai                    | `th`    |
| Turkish                 | `tr`    |
| Ukrainian               | `uk`    |
| Vietnamese              | `vi`    |

> **Note**
>
> Need more functionality? [Take a survey](https://surveys.hotjar.com/1d72aefc-0073-416d-9e70-b773458881b4) and help us develop CKBox to suit your needs better!

---

Full index of the CKBox documentation: [llms.txt](../../../llms.txt)
