Localization

Localization files are generated under Data/Localization/<language-code>/*.json. configs/language.json selects the active language; English is the guaranteed fallback.

Example language.json

1{
2 "_comment": "Active language for this LitheraRP server. Language code matching a folder under Data/Localization/.",
3 "language": "en",
4 "fallback": "en"
5}

How to create a custom language

  1. Boot the server once so localization files are seeded.
  2. Copy Data/Localization/en/ to Data/Localization/<your-code>/.
  3. Translate values, not keys.
  4. Keep fallback as en.
  5. Set the active language with /config or litherarp.lang_set <your-code>.
  6. Run litherarp.lang_status.
  7. Join a client and verify menus, HUD, notices, phone, shops, emergency calls, and admin UI.

Shipped language packs are en, fr, and de. Custom packs can use any safe language code, for example es or pt-br.

Do not rename keys

Code calls keys with L.Get("some.key"). If a key is missing, English fallback is used.

Best practices

  • Keep placeholders in the same order.
  • Preserve numeric placeholders such as {0}, {1}, {2}.
  • Avoid adding markup unless the existing string already uses it.
  • Keep technical ids untranslated.
  • Test long strings in UI.
  • Use English as the source of truth for new keys.

Localization commands

CommandPurpose
litherarp.lang_set <code>Set the active language code and reload.
litherarp.lang_reloadReload language config and active translation pack.
litherarp.lang_resetOverwrite Data localization files with shipped defaults.
litherarp.lang_statusPrint active language, fallback, and key counts.