# Translations

Every text the players and admins see comes from one JSON file per language in `locales/`. English (`en.json`) and Polish (`pl.json`) are included and complete: the UI, notifications, errors, key binding names, admin panel and the descriptions in the Settings tab.

## Set the server language

```lua title="shared/config.lua"
Config.Locale = 'pl'
```

The same file is used by the server, the client and the UI. If the file does not exist, `en.json` is used.

## Add a language

:::steps
### Copy the English file
Copy `locales/en.json` to `locales/<code>.json`, for example `locales/de.json`.

### Translate the values
Change only the values, never the keys. Keep placeholders like `%item`, `%count` or `%id` as they are; they are replaced with real values.

### Switch to it
Set `Config.Locale = 'de'` and restart the resource.
:::

A key missing from your file falls back to the English text built into the code, so a partly translated file still works.

## Sections of the file

| Section | What it holds |
|---|---|
| `ui` | Inventory interface: panels, buttons, context menu, dialogs. |
| `notify` | Notifications. |
| `error` | Error messages for every server error code. |
| `keys` | Names of the key bindings in the FiveM settings. |
| `container` | Default names of containers (Ground, Trunk...). |
| `hands` | Held item hints. |
| `outfit` | Outfit names and progress texts. |
| `admin` | Admin panel. |
| `loc` | Admin panel Locations tab. |
| `settings` | Admin Settings tab, including `settings.groups.<group>` and `settings.fields.<field>` labels and descriptions. |
| `slotGroups` | Headings of equipment slot groups, including groups of [custom slots](/new/inventory-v2/api/custom-slots). |

Item labels and descriptions are not in the locale files: they come from the item definitions in `shared/items.lua`, ox data or runtime items.
