Messages & languages
Every text Voxen shows a player lives in messages/<language>.yml. en_US and pl_PL
ship by default.
How a player’s language is chosen
Section titled “How a player’s language is chosen”- The language they picked with
/lang <language>, if any. - Their client language, when a matching file exists.
default-languagefromconfig.yml.
/lang auto clears the manual choice and goes back to following the client. The console
always uses default-language.
Adding a language
Section titled “Adding a language”-
Copy an existing file under the new locale name:
Terminal window cp messages/en_US.yml messages/de_DE.yml -
Translate the values. Keys and placeholders must stay as they are.
-
Run
/voxen reload. Clients set to German now get the new file, and/lang de_DEpicks it manually.
The prefix
Section titled “The prefix”The first key in every file is used in front of most plugin messages:
prefix: "<gray>[<aqua>Voxen</aqua>]</gray> "Set it to an empty string to drop the prefix everywhere at once.
Placeholders in messages
Section titled “Placeholders in messages”Each message accepts its own placeholders and they are not interchangeable. A few common ones:
| Placeholder | Appears in |
|---|---|
<player> |
anything about a player |
<channel> |
channel messages, already rendered from display-name |
<remaining> |
cooldowns and mute expiry |
<reason> |
mute messages |
<amount> |
list headers |
chat-cooldown: "<red>Wait <white><remaining></white> before sending another message."muted-player: "<green>Muted <white><player></white> in <white><channel></white>."Updating
Section titled “Updating”New messages added by a plugin update are appended to every language file on startup, in English. Your translations and comments are left alone, so after an update you only have to translate the new lines.