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_errorsuccess_withdrawinfo_press_to_opentarget_open_banknotify_interest_titleaccount_types_checkingtiers_basicloan_types_personalui_bank_nameadmin_credit_score_set
Adding A New Language
- Copy
locales/en.jsonto a new file such aslocales/es.json. - Translate the values while keeping every key unchanged.
- Configure your server's locale behavior the same way you do for other
ox_libresources. - 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
%sintact. - 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:
- restart
oxide-banking - open the bank UI
- trigger a bank notification
- test ATM prompts and target labels
- check server console for JSON or locale load errors