Locales and data files
These files control translated text and postal codes shown on the HUD. They live outside encrypted code in typical escrow builds, so you can edit them like normal files.
Locales (locales/)
Default languages
The resource ships JSON files such as:
en.json— Englishde.json— German
How translation works
- Strings are grouped by feature (chat, commands, UI labels, settings, etc.).
- Placeholders like
%sare filled in by the game (for example a player name). Keep the same placeholders when you translate.
Changing the default language
Language selection is driven by ox_lib locale settings on your server (the resource calls lib.locale() in shared.lua). Set your server’s locale the way your host documents for ox_lib / framework so players get the right file.
Adding a new language
- Copy
en.jsonto a new file, for examplefr.json. - Translate the values; keep keys identical.
- Ensure your locale system is set to use that language code.
If a key is missing, behavior depends on ox_lib fallbacks — always copy the full structure from en.json first.
What you might edit
- Command titles and messages (
idsCommand,oocCommand,announceTitle, …). - UI labels under
ui(settings panel, chat placeholder, speedometer units, …).
Invalid JSON (missing comma or quote) will break loading — use a JSON validator if unsure.
Postal data (data/postals.json)
What it is for
The client loads data/postals.json to show the nearest postal code (or similar location aid) together with street and area on the HUD.
Editing
- The file must stay valid JSON.
- Structure must match what the HUD code expects (usually a list of entries with coordinates and codes). If you use a community postal pack, use the version packaged for your map or converter.
- After edits, restart
ols_hud(or the server).
Backup
Keep a copy of the original postals.json before replacing it with another dataset.