Skip to content

Start

Languages ​

The language of the server is Config.Locale in rlx/shared/config.lua ("en" or "fr"). Missing texts fall back to English.

Every resource keeps its own texts, one file per language, in its locales/ folder:

rlx_bank/
├─ manifest.json        "server_scripts": ["@rlx/lib/rlx.lua", "locales/*.lua", "shared/config.lua", "server/main.lua"]
├─ shared/config.lua    settings only
├─ server/main.lua
└─ locales/
   ├─ en.lua            Locales = Locales or {}   Locales.en = { deposit = "Deposit", ... }
   └─ fr.lua            Locales = Locales or {}   Locales.fr = { deposit = "Déposer", ... }
  • Add a language: copy locales/en.lua as locales/de.lua (or es.lua…), rename Locales.en to Locales.de, translate the values and keep the keys. "locales/*.lua" in the manifest loads the new file by itself. Do the same in each resource you use, then set Config.Locale = "de".
  • The framework follows the same rule: rlx/locales/en.lua, rlx/locales/fr.lua (every message, command help and parameter name).
  • Your own resource: the same locales/ folder, "locales/*.lua" right after @rlx/lib/rlx.lua in the manifest, then local T = RLX.Translator(Locales) and T("hello", name) ({1}, {2}… are replaced by the arguments).
  • Data labels (items, jobs, shops, emotes, garages…) stay next to their data, as a plain text or one text per language:
    lua
    bread = { label = { en = "Bread", fr = "Pain" }, weight = 250 },
    The core resolves its own data; in your resource, call RLX.Localize(MyConfig) at the end of your config.
  • rlx_ipl is standalone: its language is IplConfig.locale.