How to Change the Script Locale
All senor scripts use ox_lib for localization. The active locale is controlled by a single server convar — no file editing required.
How it works
Section titled “How it works”ox_lib loads locale files from the locales/ folder inside each resource. The file to load is determined by the ox:locale convar set on the server.
Available locale files are named by their language code, e.g. en.json, fr.json, de.json.
Setting the locale
Section titled “Setting the locale”In your server.cfg, add the following convar before your ensure statements:
setr ox:locale enReplace en with the language code matching a file in the locales/ folder of the script.
Verify the locale loaded
Section titled “Verify the locale loaded”- Start the server
- Check the console — ox_lib will print a warning if the locale file was not found
- In-game text (notifications, labels, commands help) should now appear in the selected language
Adding a custom locale
Section titled “Adding a custom locale”If your language is not included, you can add it yourself:
- Copy
locales/en.jsonfrom the script folder - Rename it to your language code, e.g.
locales/pt.json - Translate all the values (keep the keys exactly as-is)
- Set
setr ox:locale ptinserver.cfg
Example locale file structure
Section titled “Example locale file structure”{ "command_help": "Open the redzone admin panel", "blip_name": "Red Zone"}Each key maps directly to a locale('key') call in the Lua scripts.