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
- Boot the server once so localization files are seeded.
- Copy
Data/Localization/en/toData/Localization/<your-code>/. - Translate values, not keys.
- Keep
fallbackasen. - Set the active language with
/configorlitherarp.lang_set <your-code>. - Run
litherarp.lang_status. - 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
| Command | Purpose |
|---|---|
| litherarp.lang_set <code> | Set the active language code and reload. |
| litherarp.lang_reload | Reload language config and active translation pack. |
| litherarp.lang_reset | Overwrite Data localization files with shipped defaults. |
| litherarp.lang_status | Print active language, fallback, and key counts. |