--- Localização
Localization
Every player-facing string — the interface, the notifications, the chat suggestion, the body part names, the type and severity labels — runs through ox_lib's locale system. Translation files live in locales/*.json.
Set the language
setr ox:locale "tr"It is a global convar, so every BUPA script on your server follows the same setting from one line.
Shipped languages
| Code | Language |
|---|---|
en |
English (fallback) |
de |
German |
es |
Spanish |
fr |
French |
it |
Italian |
nl |
Dutch |
pl |
Polish |
pt |
Portuguese |
ru |
Russian |
tr |
Turkish |
English is always the fallback, so a key you leave out of a translation shows the English text rather than a raw key.
Add or edit a language
Each file is a flat JSON map of key → text. Copy locales/en.json, translate the values, keep the keys and any %d placeholders intact, and save it as locales/<code>.json.
Key groups
| Prefix | Used for |
|---|---|
ui_* |
The interface — titles, buttons, hints, placeholders |
dur_* |
Duration chip labels (dur_m, dur_h) |
type_<id> |
One per entry in Config.Types |
sev_<id> |
One per entry in Config.Severities |
bp_<id> |
One per entry in Config.BodyParts |
notify_* |
Success notifications |
err_* |
Every failure message |
cmd_target_help |
The chat suggestion for the player-id argument |
If you add a body part, type or severity to config.lua, add the matching bp_, type_ or sev_ line to every locale file. A missing key falls back to English; a key missing from English too shows as-is.
The locales/ folder is escrow-ignored, so it stays open for editing.