# Translations

Every text — the panel, the map hints, lock labels, combat log markers, Discord logs, notifications and the camera caption — comes from `shared/locales/`.

## Shipped languages

| File | Language | Admin tabs |
| --- | --- | --- |
| `cs.lua` | Čeština | English |
| `de.lua` | Deutsch | English |
| `en.lua` | English | English |
| `es.lua` | Español | English |
| `fr.lua` | Français | English |
| `it.lua` | Italiano | English |
| `nl.lua` | Nederlands | English |
| `pl.lua` | Polski | Polski |
| `pt-BR.lua` | Português (Brasil) | English |
| `tr.lua` | Türkçe | English |

Everything players see is translated in all ten files. The admin Editor and Stats tabs (`editor_*`, `admin_*`, `stats_*`, `capture_*` keys) are in English and Polish; other languages fall back to English for them until you add the keys.

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

A key missing in your language falls back to English.

## Add a language

1. Copy `shared/locales/en.lua` to a new file, for example `shared/locales/sv.lua`.
2. Change the first line to `Locales['sv'] = {` and translate the values. Keep the keys.
3. Set `Config.Locale = 'sv'` and restart the resource.

Every file in `shared/locales/` is loaded automatically.

## Placeholders

| Key | Placeholder |
| --- | --- |
| `locked_job` | `%s` = job label, e.g. "Police only" |
| `time_minutes`, `time_hours`, `time_days` | `%d` = number |
| `event_ends` | `%s` = time left, e.g. "46:53" |
| `combat_marker_time` | `%d` = seconds |
| `log_combat_body` | `%s` name, `%s` character, `%s` kind (`drop` / `relog`), `%s` reason |
| `stats_days` | `%d` = number of days |

## Plural forms

Languages with a separate form for 2–4 (Polish: "2 minuty", "5 minut") can add `time_minutes_few` and `time_hours_few`.
The "few" form is used for numbers ending in 2, 3 or 4, except 12–14:

```lua title="shared/locales/pl.lua"
time_minutes = '%d minut temu',
time_minutes_few = '%d minuty temu',
```

## Location names

Labels and descriptions of your spawns are written in `Config.Spawns`, in the editor or by the resource that registers them, so translate them there.
Category labels come from `category_<id>` keys; a `label` in `Config.Categories` overrides them. Weather names are the `weather_<name>` keys.
