SHOPPING CART

Onex

TRANSLATIONS#

This page explains how to set your server language and how to contribute translations for Onex Scripts.

SETTING THE LANGUAGE#

Add the following line to your server.cfg:

server.cfg
setr onex:locale "en"

Replace "en" with your desired language code. This applies the locale globally across all Onex Scripts automatically.

CONTRIBUTING#

All translations for all our scripts are managed from our community translations repository on GitHub:

👉 github.com/Onex-Scripts/translations

We'd love your help! If you want to add a new language or improve an existing one, open a Pull Request with your changes and our team will review it.

GUIDELINES#

Read all guidelines carefully before submitting a Pull Request. PRs that do not follow these rules will be rejected.

  • Locale files must be named using the correct ISO 639-1 language code and be a .json file — for example en.json, fr.json, de.json.
  • Place your file in the correct script folder: {script-name}/de.json
  • When creating a new locale, copy en.json (our base file) and replace the values with your translations.
  • Do not change the keys — only translate the values.
  • Update the _meta block at the top to match your language:
{ "_meta": { "language": "German", "code": "de" }, ... }
  • Keep placeholders exactly as they appear in the original. Do not translate or remove them.
  • Do not translate keys that are single characters or suffixes, such as "RENTAL_UI_DAY_IF_PLURAL": "S" — these are used programmatically.
  • Validate your file for JSON syntax errors before submitting at jsonlint.com.

EXAMPLE#

Here's a snippet from the base en.json for the rental script:

en.json
{ "_meta": { "language": "English", "code": "en" }, "RENTAL_NOTIFICATION_NO_MONEY_ALERT": "You don't have enough money to rent this vehicle.", "RENTAL_UI_MAIN_HEADING": "CAR RENTAL", "RENTAL_UI_RENT_NOW_BUTTON": "RENT NOW" }

A correctly translated fr.json would look like:

fr.json
{ "_meta": { "language": "French", "code": "fr" }, "RENTAL_NOTIFICATION_NO_MONEY_ALERT": "Vous n'avez pas assez d'argent pour louer ce véhicule.", "RENTAL_UI_MAIN_HEADING": "LOCATION DE VOITURE", "RENTAL_UI_RENT_NOW_BUTTON": "LOUER MAINTENANT" }

Only the values are translated. The keys, _meta structure, and any placeholders remain exactly the same.