Translations
Edit the bundled languages of Aurora HUD, or add your own.
One JSON file per language in config/locales/. The file name is the language code, and
it is what picks the flag.
The list
Section titled “The list”A language has to be named in config/client.lua:
Custom.locales = { 'en', 'pt', 'es', 'fr', 'de' }Adding one: put the file in config/locales/, then add its name, without .json, to
that list.
What makes a language valid
Section titled “What makes a language valid”A language either loads or it does not. It needs:
- a name in the list, using only letters, digits,
-and_ - a matching file in
config/locales/ - valid JSON
- a
_metablock with aname - at least one translated key
- a
nameno other language is already using
{ "_meta": { "name": "Português" }, "menu.appearance.title": "Aparência"}Anything that fails is not shown to players, and the reason is named in /hud → Support.
Two languages with the same name
Section titled “Two languages with the same name”If two files declare the same _meta.name, both are dropped and Support names them. The
usual cause is copying a language file without changing the name inside it.
The flag is not configured. It comes from the file name:
| File | Flag |
|---|---|
pt.json |
Portugal |
pt-BR.json |
Brazil |
pt-AO.json |
Angola |
en.json |
United Kingdom |
The suffix is the country’s two-letter code. Without a suffix the HUD uses the language’s usual country. An unknown language, or a country with no bundled flag, shows the code as text. That is a normal state, not an error.
English is the fallback, not a requirement
Section titled “English is the fallback, not a requirement”A key missing from a language falls back to en.json, so a partial translation degrades
into English rather than showing a raw key. Removing en.json still leaves the HUD
running, but missing keys then show as raw keys.
When nothing loads
Section titled “When nothing loads”If no language survives, the HUD does not start: nothing is drawn and /hud refuses to
open. The reason is printed to the server console. Fix the list or the files and restart.
After editing
Section titled “After editing”ensure aurora_hudFiles are read at start-up. Nothing here is hot-reloaded.
Which language a player sees
Section titled “Which language a player sees”Admins set the server default in /hud → Admin. Each player can pick another, saved with
the rest of their settings. A saved language that no longer loads falls back to the server
default.