> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_dealership/configuration/locale.md).

# Locale

`rcore_dealership` loads translations from `rcore_dealership/locales`.

## 🌍 Setting the Language

Set the active language in `config.lua`:

```lua
Config.Locale = 'en'
```

Only `en.lua` is included by default. If the configured language is missing, the script falls back to English.

## ➕ Adding a Language

{% stepper %}
{% step %}

### Copy the English file

Copy `locales/en.lua` to a new file named after your language code, for example `locales/de.lua`.
{% endstep %}

{% step %}

### Translate the strings

Each file defines one table, `Locales.<code> = { ... }`. Keep the keys the same and translate only the values. Values can contain `%s` placeholders - leave them in place.

```lua
Locales.de = {
    UI = {
        ['VEHICLE_CLASS_0'] = 'Kompaktwagen',
        -- ... interface strings
    },
    ['SOME_KEY'] = 'Text mit %s Platzhalter',
    -- ... notification strings
}
```

The `UI` sub-table holds interface text; the top-level keys hold server and notification text.
{% endstep %}

{% step %}

### Select your language

Set `Config.Locale` to your new code and restart the resource. Files in `locales/` are loaded automatically - no manifest edit is needed.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
Locale files are editable even on the encrypted build, so your translations are safe across updates as long as you keep a backup.
{% endhint %}
