NationCrest

Messages and language

Editing what players see, the three shipped languages, and adding your own.

Every string a player or your console can see lives in a language file. Nothing is written into the plugin itself, so anything you want reworded, you can reword.

The files

plugins/NationCrest/lang/

en_US.yml
fr_FR.yml
es_ES.yml

Pick one with language in config.yml, without the .yml:

language: fr_FR

Then /flag reload.

What is in a file

Placeholders inside messages

Messages use curly brackets:

info:
  other: '{prefix}&f{player} &7is showing as &f{country} &7({code}) {display}'
In a messageFilled with
{prefix}The prefix key
{player}A player name
{country}The full country name
{code}The two letter code
{display}The formatted flag

Which of these are available depends on the message. The shipped file shows what each one gets.

Do not switch these to angle brackets. Angle brackets are used by Prism's own colour tags and the two would be read as each other. Angle brackets are only used in command usage text, for example /flag set <player> <code>.

Colour

Same syntax as everywhere else in this plugin. See Display modes.

Adding your own language

The plugin does not need an update for this.

Copy a shipped file

Copy en_US.yml to whatever you want to call it, for example de_DE.yml. Java locale style names are the convention, but any name works.

Translate it

Leave the keys alone, change the values. Keep lang-version where it is.

Your own file is never rewritten by an update. Any message added in a later version that your file does not have yet shows in English until you add it.

Point the config at it

language: de_DE

Reload

/flag reload.

If you name a language that has no file, the plugin logs a warning and falls back to English rather than breaking.

A language file you wrote yourself is loaded exactly as it stands. The three shipped files are version managed and gain new keys automatically when the plugin updates, yours will not. If a plugin update adds a message, compare your file against en_US.yml and copy the new key across.

On this page