Localization Guide
How localization works in oxide-banking with ox_lib and JSON locale files.
Every message players see — notifications, prompts, menus, and the banking interface — can be translated by editing simple text files. No coding needed.
Where The Text Lives
Translations are JSON files in the locales/ folder. The resource ships with English:
locales/en.json
Each line is a key (the name the code looks up) and a value (the text players see):
"success_withdraw": "Withdrew $%s successfully",
"target_open_bank": "Open Bank",
"tiers_basic": "Basic Account"You only ever change the part after the colon. Never change the key on the left.
Adding A New Language
-
Copy
locales/en.jsonand name the copy after your language code — for examplelocales/es.jsonfor Spanish. -
Translate the values (right side only). Keep every key unchanged.
-
Tell
ox_libwhich language your server uses, if you haven't already, by adding this toserver.cfg:setr ox:locale esThis is the same setting used by all your other
ox_lib-based resources. -
Restart
oxide-bankingand check the bank in game.
New locale files are picked up automatically — you don't need to edit the manifest.
Translation Tips
- Keep placeholders like
%sexactly where they make sense in your language — they get replaced with amounts, names, and numbers at runtime. Removing one breaks the message. - JSON is picky: every line except the last needs a comma at the end, and text must stay inside double quotes. If the bank suddenly shows raw key names like
error_bank_error, your file probably has a syntax error — paste it into an online JSON checker to find it. - If you update the resource later, compare your language file against the new
en.json— new features may add new keys, and missing keys fall back to showing the key name.
Checking Your Translation
- Restart
oxide-banking. - Open the bank — menus and labels should be translated.
- Make a deposit or withdrawal — the notification should be translated.
- Walk to an ATM — the prompt/target label should be translated.
- Watch the server console on startup for JSON or locale errors.