Translate Strings
All player-facing text lives in JSON locale files under /locales. The script ships with en.json.
Switch language
Set the locale in cfg.lua:
cfg.locale = 'en' -- loads /locales/en.jsonThe value must match a file name in /locales (without the .json).
Add a new language
Copy
locales/en.jsonto a new file, e.g.locales/fr.json.Translate the values only — never change the keys.
Set
cfg.locale = 'fr'and restart the resource.
{
"prompt": {
"open_laptop": "Ouvrir l'ordinateur",
"knock_door": "Frapper"
},
"notify": {
"no_permission": "Vous n'avez pas la permission pour cette action."
}
}Placeholders
Some strings contain placeholders that the script fills in at runtime. Keep them exactly as they are, in a spot that still reads naturally:
%s— a string (a name, an amount, an item label).%d— a whole number.%s%%— a number followed by a literal percent sign.
The same rule applies wherever a string lives — for example notify.van_seized and ui.orders.order_placed:
Where text is grouped
The locale file is organized by area so you can find strings quickly:
prompt
Interaction prompts ("Open Laptop", "Knock"…)
notify
Server notifications
progress
Progress-bar labels
command
Command help text
blip / dispatch
Map blips and police dispatch messages
activity
Vault/sales activity descriptions
editor
Placement-tool hints (drop / NPC vendor / warehouse editors)
ui.*
Every NUI panel: laptop tabs, orders, stock, pricing, vault, analytics, members, inbox, settings, van, sale, customer, phone app, door, admin, editor