Skip to content

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.

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.

In your server.cfg, add the following convar before your ensure statements:

setr ox:locale en

Replace en with the language code matching a file in the locales/ folder of the script.

  1. Start the server
  2. Check the console — ox_lib will print a warning if the locale file was not found
  3. In-game text (notifications, labels, commands help) should now appear in the selected language

If your language is not included, you can add it yourself:

  1. Copy locales/en.json from the script folder
  2. Rename it to your language code, e.g. locales/pt.json
  3. Translate all the values (keep the keys exactly as-is)
  4. Set setr ox:locale pt in server.cfg
{
"command_help": "Open the redzone admin panel",
"blip_name": "Red Zone"
}

Each key maps directly to a locale('key') call in the Lua scripts.