Languages and messages
All messages are in the lang/ files. This page covers changing the language, adding your own, the prefix, the time format and turning messages off.
Language
Section titled “Language”Two files are included: lang/en.yml (English) and lang/pl.yml (Polish). Set the language in config.yml:
language: enYour own language
Section titled “Your own language”- Copy
lang/en.ymltolang/<code>.yml, e.g.lang/de.yml. - Translate the texts (and the comments, if you like).
- Set
language: deinconfig.ymland use/szpontafkzone reload.
Your comments are kept. Options added by later versions are added in English, with their documentation.
Editing rules
Section titled “Editing rules”- A message is one line (
'...') or a list of lines (- ...). Every line is sent as a separate chat line. ''(or[]) turns a message off: nothing is sent.- A deleted message is added back with its default text on the next reload or restart. To turn a message off, set it
to
''instead. {prefix}in every message is replaced withprefix(below), and{player}with the name of the player who gets it (CONSOLEfor the console).- Command messages also have
{label}: the command name the sender typed, e.g.afkzone. The other placeholders are listed above each message in the file. - PlaceholderAPI placeholders (
%...%) work too when it is installed, but not in messages to the console.
General settings of a language file
Section titled “General settings of a language file”| Key | Description |
|---|---|
prefix |
Inserted wherever a message contains {prefix}. '' means no prefix. |
time-format |
Format of times such as {time_left} and {interval}. Default: '{mm}:{ss}'. |
number-format.decimal-separator |
Separates the whole part from the decimal part, e.g. in {chance}. A dot in en.yml (12.5), a comma in pl.yml (12,5). |
placeholders |
Words returned by the plugin’s PlaceholderAPI placeholders: yes, no and none (no value, e.g. %szpontafkzone_zone% outside a zone). |
Time format
Section titled “Time format”| Token | Meaning |
|---|---|
{h}, {m}, {s} |
Hours, minutes and seconds |
{hh}, {mm}, {ss} |
The same, always with two digits (05) |
The largest unit in the format also counts everything above it: with '{mm}:{ss}' 75 minutes are shown as 75:00,
with '{h}:{mm}:{ss}' as 1:15:00. '' restores the default.
Formatting
Section titled “Formatting”Texts in the language files use the text-format syntax. See
Text formatting.
