Localization Guide

How localization works in oxide-banking with ox_lib and JSON locale files.

Localization in oxide-banking is handled through ox_lib locale loading and JSON locale files.

Locale Files

Locale files live in:

locales/*.json

The shipped locale file is:

  • locales/en.json

The manifest already includes:

files {
    'locales/*.json',
    'web/dist/**/*',
}

The resource loads translations through:

lib.locale()

Current Locale Shape

The current locale file uses a flat JSON key/value structure.

Examples:

  • error_bank_error
  • success_withdraw
  • info_press_to_open
  • target_open_bank
  • notify_interest_title
  • account_types_checking
  • tiers_basic
  • loan_types_personal
  • ui_bank_name
  • admin_credit_score_set

Adding A New Language

  1. Copy locales/en.json to a new file such as locales/es.json.
  2. Translate the values while keeping every key unchanged.
  3. Configure your server's locale behavior the same way you do for other ox_lib resources.
  4. Restart the resource and verify the translated strings appear in notifications, prompts, and UI payloads.

What Uses The Locale File

Locale strings are used by:

  • bank and ATM prompts
  • server notifications
  • error and success messages
  • admin feedback messages
  • account, loan, and credit labels
  • UI labels sent to the banking interface

Translation Notes

  • Keep placeholders such as %s intact.
  • Do not rename keys unless you are also updating every call site in Lua and UI code.
  • Add new keys to every maintained locale file when introducing new text.

Verification

After editing locale files:

  1. restart oxide-banking
  2. open the bank UI
  3. trigger a bank notification
  4. test ATM prompts and target labels
  5. check server console for JSON or locale load errors