Localization (TR / EN)
One config key drives both the admin panel (NUI) and every in-game notification (Lua), so the whole resource speaks one language.
-- config.lua
Config.Language = 'en' -- 'en' | 'tr'
Ships with English and Turkish. A missing translation falls back to English, so nothing ever shows blank.
How it works
| Side | Where the strings live |
|---|---|
| In-game notifications (Lua) | shared/locale.lua — the L('key', ...) function. |
| Admin panel (NUI) | web/src/i18n/locales/<code>.js — gettext-style, the English text is the key. |
The server sends the active language to the panel in its open payload, so both sides always match Config.Language.
Adding a new language (e.g. German)
1. In-game notifications
In shared/locale.lua, copy the Locales.en table to Locales.de and translate the values — keep the %s / %d placeholders in the same order (Lua string.format is positional).
2. Panel
Create web/src/i18n/locales/de.js exporting a map of English phrase → German, then register it in web/src/i18n/index.js:
import de from './locales/de'
const dictionaries = { tr, de }
3. Rebuild the panel
cd web
npm install # first time only
npm run build
Then set Config.Language = 'de' and restart the resource.
Panel UI text is translated at the leaf components, so **field labels, hints and dropdown options all localize automatically** — you only maintain one dictionary file per language. Technical values (weapon hashes, weather codes, ped models, job names) are intentionally left untranslated.
What is / isn't translated
- Translated: panel chrome, all 15 section labels + hints, dropdown options, buttons, HUD, warnings, toasts, and in-game notifications/kick reasons.
- Not translated: audit-log entries and game identifiers (see the note above).