Languages
The 18 bundled languages, how NexusShout picks each player's language, and how to edit or add a translation.
NexusShout's own messages, such as cooldown and filter warnings, come from language files in plugins/nexusshout/locales/ (plugins/NexusShout/locales/ on BungeeCord). The chat format, the private message formats, and Discord text are set in config.yml and discord.yml instead.
Bundled languages
| File | Language |
|---|---|
ar_SA.yml | Arabic |
de_DE.yml | German |
en_US.yml | English (US) |
es_ES.yml | Spanish (Spain) |
fr_FR.yml | French |
hi_IN.yml | Hindi |
id_ID.yml | Indonesian |
it_IT.yml | Italian |
ja_JP.yml | Japanese |
ko_KR.yml | Korean |
nl_NL.yml | Dutch |
pl_PL.yml | Polish |
pt_BR.yml | Portuguese (Brazil) |
ru_RU.yml | Russian |
sv_SE.yml | Swedish |
tr_TR.yml | Turkish |
vi_VN.yml | Vietnamese |
zh_CN.yml | Chinese (Simplified) |
How the language is picked
- With
detect-player-language: true(the default), each player sees messages in their Minecraft client language when a file for it exists. - The file name must match the client language and region exactly. A player using Spanish (Mexico) gets the fallback, not
es_ES.yml. Addes_MX.ymlto cover them. - The fallback is the
default-localefile (en_USby default). It is also used for the console, and for everyone whendetect-player-languageisfalse. If no file matchesdefault-locale,en_US.ymlis used and a warning is logged. - When a key is missing from a player's file, the
default-localetext is used, then theen_UStext. When it is missing there too, the key name itself is shown.
Editing messages
- Edit any file, then run
nshoutreload. - Messages use the
formatterfromconfig.yml, so&codes, MiniMessage tags, or both work the same way as informat. - Your edits are kept when you update. New keys are added to the end of the bundled files on start.
- A bundled file you delete comes back with default text on the next start or reload.
Keys
| Key | Shown when | Placeholders |
|---|---|---|
no-permission | The player is missing a permission | |
cooldown | The player is on cooldown | {time}, {unit} |
players-only | The console runs a player command | |
server-disabled | Global chat is used on a server not in enabled-servers | |
empty-message | The message is empty, or /gchat has no message while toggle mode is off | |
global-chat-enabled, global-chat-disabled | Global chat mode is turned on or off | |
player-muted | A muted player uses global chat | |
anti-flood, anti-spam, anti-caps | A filter stops the message | |
player-not-found | The private message target is offline or vanished | {name} |
cannot-message-self | A player messages themselves | |
no-reply-target | The reply command has no one to reply to | |
pm-usage | The message command is used without a player and a message | {label} |
reply-usage | The reply command is used without a message | {label} |
pm-disabled | Private messages are turned off | |
pm-muted | A muted player sends a private message | |
second, seconds, minute, minutes | Time units in the cooldown message | |
time_format | Cooldown time of a minute or more with leftover seconds | {minutes}, {minutes_unit}, {seconds}, {seconds_unit} |
{label}is the command the player typed, sopm-usageshows/nmswhen they used/nms.- For waits like "1 minute 30 seconds",
{time}is empty and{unit}holds the wholetime_formattext.
Adding a language
- Copy
en_US.ymland name it after the client language, for examplees_MX.ymlorpt_PT.yml. - Translate the text. Keep the keys and the
{placeholders}as they are. - Run
nshoutreload.
Files you add are not updated by NexusShout. When a new version adds a key, your file shows the en_US text for it until you add the key yourself. The changelog lists new keys.