Skip to content

Localization

Localization

Every string a player, an owner or an admin sees comes from ox_lib's locale system.

Shipped languages

en, tr, de, es, fr, it, pt, ru, pl, nl, sv, da, no, fi, cs, sk, hu, ro — 18 files, 285 keys each.

Choosing one

server.cfg
setr ox:locale "tr"

There is no language setting in config.lua. It is global to your server and ox_lib reads it on start. Any key missing from a translation falls back to English, so a partial translation never leaves a blank label on screen.

Adding your own

Copy locales/en.json to locales/<code>.json, translate the values, and set ox:locale to match. The file is picked up on restart — nothing needs registering.

Station names are not in the locale files. A station's label comes from Config.Stations, and an owner can rename their own station from the Overview page. Fuel labels come from Config.FuelTypes. Both are yours to write in whatever language you run.

What is translated

Prefix Covers
ui_ The management dashboard: navigation, page titles, stats, buttons, confirmations
adm_ The /fueladmin panel
Pump and charger strings The in-world panels, presets, payment method and speed
Notification strings Low fuel, wrong fuel, tank full, payment failed, jerry can messages
Error strings Everything that can be refused — no permission, cannot afford, not electric, no vehicle

The locale files are outside escrow, so they can be edited on a purchased copy.