Localization
Locales, Config.Locale, and adding a language.
All user-facing UI and notification strings live in locales/*.json (flat snake_case keys). That folder is escrow-ignored so you can edit or add files.
Lua notifies call locale('some_key') (ox_lib). The tablet / phone UI gets the same dictionary from the getSetup NUI callback, so one file covers both.
Config.Locale = 'es' -- bundled: en | es | pt | de | fr | plThe resource calls lib.locale(Config.Locale or 'en') on start. Restart after changing it. If you already set the ox:locale convar for other ox_lib resources, you can leave Config.Locale matching that convar so everything stays on one language.
%s in a value is a placeholder (locale('job_busy', time)). Keep the same number of %s as English. Do not translate _G[S]cripts, the brand kicker GS Depot (phone_brand_kicker), or Whiz.
Add a language
- Copy
locales/en.jsontolocales/<code>.json(for examplelocales/nl.json) - Translate values only. Keys must stay identical or that string falls back / shows the key
- Set
Config.Locale = 'nl'and restart
