> ## Documentation Index
> Fetch the complete documentation index at: https://docs.redutzu.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Localization

> Set the MDT's language and formats, edit translations, or add a new language.

The MDT ships with 24 languages. You set a server default, and every officer can pick their own language in their MDT settings.

![Language picker in an officer's MDT settings](https://mintcdn.com/redutzusscripts/jYySSRvwCjpWaAJk/images/guides/localization-officer-language.webp?fit=max\&auto=format\&n=jYySSRvwCjpWaAJk\&q=85\&s=4c1c96c624e7ddeb34b30b4fb1c8e05d)

Officers pick their language in their MDT settings

## Languages and formats

There are two language settings:

| Setting | What it does |
| - | - |
| `Config.Locale` | The server language. Used for in-game notifications, camera overlays, logs, and for officers who haven't picked a language. |
| `Config.SupportedLocales` | The languages officers can pick in their settings. Must include `Config.Locale`. |

> [tab] Admin panel
>
> **1. Open General**
>
> Run `/mdtadmin` and open **General**.
>
> **2. Pick the languages**
>
> Under **Language & formats**, choose the **Server language** and the **Available languages**.
>
> **3. Set the formats**
>
> Choose the currency, date and clock format, number format, units, temperature, and phone number format. The preview shows how each one looks.
>
> ![Language and formats settings in the admin panel, with previews](https://mintcdn.com/redutzusscripts/jYySSRvwCjpWaAJk/images/guides/localization-formats.webp?fit=max\&auto=format\&n=jYySSRvwCjpWaAJk\&q=85\&s=2639e9a8a67f720cd54f6667c719163e)
>
> Language and format settings in the General section
>
> Changes apply instantly for every player.

> [tab] config.lua
>
> ```lua config/config.lua theme={null}
> Config.Locale = 'de-DE'
>
> Config.SupportedLocales = { 'en-US', 'de-DE', 'fr-FR' }
>
> Config.Currency = 'EUR' -- USD, EUR or GBP
>
> Config.Formats = {
>     Date = 'European',        -- US | European | ISO | Long
>     Time = '24h',             -- 12h | 24h
>     Number = 'EU',            -- US | EU
>     WeekStart = 1,            -- 0 = Sunday ... 6 = Saturday
>     Measurement = 'metric',   -- imperial | metric
>     Temperature = 'celsius',  -- fahrenheit | celsius
>     Phone = '({3}) {3}-{4}',
>     Birthdate = 'DMY'         -- DMY | MDY
> }
> ```
>
> Restart the resource to apply the changes.

> [!NOTE]
>
> The phone format is a template. `{3}` means "3 digits go here", and anything else is shown as typed. `({3}) {3}-{4}` turns `5551234567` into `(555) 123-4567`.

`Formats.Birthdate` tells the MDT how your framework stores birthdates. It's only used when a date like `03/05/1990` could be read either way.

## Included languages

`en-US`, `fr-FR`, `de-DE`, `es-ES`, `pt-PT`, `it-IT`, `ro-RO`, `cs-CZ`, `el-GR`, `hu-HU`, `bg-BG`, `nl-NL`, `pl-PL`, `tr-TR`, `no-NO`, `sv-SE`, `da-DK`, `fi-FI`, `ru-RU`, `zh-CN`, `hi-IN`, `id-ID`, `ar-SA`, `af-ZA`

Each language is one JSON file in `nui/dist/locales`, such as `nui/dist/locales/de-DE.json`.

## Edit a translation

**1. Open the file**

Open the language file in `nui/dist/locales`, such as `de-DE.json`.

**2. Change the text**

Find the text you want to change and edit the value on the right. Never change the keys on the left.

```json nui/dist/locales/en-US.json theme={null}
{
    "INCIDENTS": {
        "FORM_DIALOG": {
            "TRIGGER": "Create Incident"
        }
    }
}
```

Keep placeholders such as `{{name}}` or `{{count}}` exactly as they are. The MDT fills them in.

**3. Restart**

Restart `redutzu-mdt`. Players who had the MDT open need to reopen it.

> [!WARNING]
>
> Script updates replace the files in `nui/dist/locales`. Keep a copy of the files you edit, and compare them with the new version after each update.

## Add a new language

**1. Copy the English file**

Copy `nui/dist/locales/en-US.json` and name the copy after your language code, such as `ja-JP.json`. Keep it in the same folder.

**2. Translate the values**

Translate every value. Leave the keys and the `{{placeholders}}` as they are.

> [!TIP]
>
> Any text you haven't translated yet shows in English, so you can translate the file in parts.

**3. Restart the MDT**

Restart `redutzu-mdt` so it finds the new file.

**4. Enable the language**

In `/mdtadmin`, open **General** and add it to **Available languages**. To make it the server language, pick it as **Server language** too.

Or add it in `config/config.lua`:

```lua config/config.lua theme={null}
Config.SupportedLocales = { 'en-US', 'ja-JP' }
Config.Locale = 'ja-JP'
```

> [!NOTE]
>
> The admin panel only lets you add a language whose file exists in `nui/dist/locales`. The file name must be a language code, such as `ja-JP` or `pt-BR`.

> [card] [Share your translation](https://discord.gg/kJkNSYM9pt)
>
> Made a new language or fixed a translation? Send it to us on Discord and we'll include it in the next update.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.