Configurations

🌍 Languages & Translations

On this page, you will find how to change the language of the plugin and how to translate its messages yourself.

#Translations

Every line the plugin can print lives in one file:

PhoenixCrates/translations/translations.en.yml

Messages to players, command replies, the holograms, the menus and the whole in-game editor are all in there. Edit it, run /crates reload, and the new text is live.

To stop a message from appearing at all, set it to '' (empty quotes).

Every add-on brings its own file into the same folder, named after itself, so the Rarity messages are in rarity.translations.en.yml and the Lootbox ones in lootbox.translations.en.yml. They work exactly like the main file.

circle-info

Older versions kept this in messages.yml. On the first start after upgrading, the plugin copies your text across into the translation file on its own and renames the old one to old_messages.yml. Editor text is not carried over, since the old file never had it.

#Language

The language the plugin loads is set in config.yml, or from Editor > Settings > Language.

language: UNDEFINED

Crate Editor > Settings (Language)

UNDEFINED is the value a fresh install starts on, and it behaves as English. It is also the one value the editor will not let you pick again once you have chosen a real language.

The picker lists every language the plugin knows about:

Code Language File
EN_US English (United States) translations.en.yml
AR_SA Arabic (Saudi Arabia) translations.ar.yml
PT_BR Portuguese (Brazil) translations.br.yml
PT_PT Portuguese (Portugal) translations.pt.yml
ES_ES Spanish (Spain) translations.es.yml
FR_FR French (France) translations.fr.yml
DE_DE German (Germany) translations.de.yml
IT_IT Italian (Italy) translations.it.yml
NL_NL Dutch (Netherlands) translations.nl.yml
SV_SE Swedish (Sweden) translations.sv.yml
PL_PL Polish (Poland) translations.pl.yml
CS_CZ Czech (Czechia) translations.cs.yml
RU_RU Russian (Russia) translations.ru.yml
TR_TR Turkish (Turkey) translations.tr.yml
EL_GR Greek (Greece) translations.el.yml
HI_IN Hindi (India) translations.hi.yml
ID_ID Indonesian (Indonesia) translations.id.yml
VI_VN Vietnamese (Vietnam) translations.vi.yml
JA_JP Japanese (Japan) translations.ja.yml
KO_KR Korean (South Korea) translations.ko.yml
ZH_CN Chinese (Simplified) translations.zh.yml

The file name uses the short form rather than the code, which is worth knowing before you go looking for it — PT_BR writes translations.br.yml, not translations.pt_br.yml.

circle-exclamation

Only the languages included in the build you are running can be picked. The rest are dark grey in the editor and clicking skips straight past them. At the moment the plugin ships with English, so the way to run it in another language is to translate the file yourself.

#Setting it from a command

/crates setLanguage <language> switches language without a full reload. It only accepts a language the build actually ships, and answers No translation is bundled for language ... for anything else.

While language is still UNDEFINED, anyone joining with phoenixcrates.admin is offered a suggestion in chat, picked from where the server appears to be, with the command ready to click. Setting a language yourself stops it.

#Translating the plugin

Everything sits under the short language code at the top of the file, and the value is either a line or a list of lines. Translate the right-hand side and leave the keys and the placeholders alone.

en:
  unknown-argument: "&cUnknown Argument!"
  no-permission: "&cYou are not allowed to do this! (Need %permission%)"
en:
  error-processing:
    - "&cAn error occurred while processing this action (Check console):"
    - "&7%message%"

Anything wrapped in % is filled in by the plugin, so %player%, %permission% and %message% have to survive the translation to keep working. Colour codes can be moved around freely.

circle-info

English is always loaded first, and the chosen language is laid over the top of it. A key you have not translated yet falls back to its English line rather than printing blank, so a file can be translated a piece at a time.

circle-info

Keep a copy of your translated file before updating the plugin. New keys are added to it automatically — the console prints Missing value for key "..." and writes the English default straight into your file — but it is the file your work lives in.

#The editor is translated too

Everything under the editor keys is the text of the in-game editor — the name and description of every option. Translating those is optional, and skipping them leaves the editor in English while your players see your language.

Last updated about 1 hour ago
My Cart (0 items)

Oops... looks like the spiders padded through here

Add products to your cart and remove them from here Lets buy