Translating¶
EasyAdmin supports multiple languages. Translation files are JSON files stored in the language/ directory.
Supported Languages¶
| Code | Language |
|---|---|
de |
German |
en |
English |
es |
Spanish |
fr |
French |
it |
Italian |
nl |
Dutch |
pl |
Polish |
Setting Language¶
Set the language via convar:
1 | |
Default: en (English)
Translation File Format¶
Translation files are JSON arrays containing key-value pairs. Each file represents one language.
Example from en.json:
1 2 3 4 5 6 7 8 9 10 11 | |
The file must be a JSON array with a single object containing:
translator— Translator or team namelanguage— Language code (matches the filename)- All translation key-value pairs
Adding a New Language¶
- Copy
language/en.jsontolanguage/xx.json(replacexxwith the language code). - Translate all string values to the target language.
- Update the
translatorandlanguagefields. - Keep all keys unchanged.
- Do not modify the JSON structure or escape sequences.
Escape Sequences¶
Some strings contain formatting codes:
~b~— Blue text color<C>— Cyan text color (HTML-like tag)%s— String placeholder for dynamic values
Preserve these codes exactly as they appear in the English file.
Updating Existing Languages¶
To update an existing language file:
- Open the corresponding
language/xx.jsonfile. - Compare keys with
language/en.jsonto find missing entries. - Update or add translations as needed.
- Keep the JSON array structure intact.
Adding New Translation Keys¶
When new UI strings are added to EasyAdmin, they must be registered in shared/util_shared.lua and added to all language files. Contributors adding new strings should:
- Add the English string to
language/en.json. - Use
GetLocalisedText("key_name")in Lua code to reference the string. - Notify translators to add the new key to their language files.