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

  1. Copy locales/en.json and name the copy after your language code — for example locales/es.json for Spanish.

  2. Translate the values (right side only). Keep every key unchanged.

  3. Tell ox_lib which language your server uses, if you haven't already, by adding this to server.cfg:

    setr ox:locale es

    This is the same setting used by all your other ox_lib-based resources.

  4. Restart oxide-banking and 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 %s exactly 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

  1. Restart oxide-banking.
  2. Open the bank — menus and labels should be translated.
  3. Make a deposit or withdrawal — the notification should be translated.
  4. Walk to an ATM — the prompt/target label should be translated.
  5. Watch the server console on startup for JSON or locale errors.