Messages & translations
Change or translate the text players see.
Each player sees MachineEngine in their own Minecraft language. The text is in two places:
| What | Where |
|---|---|
| Chat and action bar messages, admin command output | plugins/MachineEngine/lang/<language>.yml |
| Item lore, the player settings menu | plugins/CraftEngine/resources/machineengine/configuration/lang.yml |
Chat and action bar messages
One file per language, in plugins/MachineEngine/lang/:
en_us.ymlis written from MachineEngine's built-in English, and gets new messages when you update.fr_fr.ymlships with MachineEngine.- Add a language by copying
en_us.ymltolang/<language code>.yml(de_de.yml,es_es.yml…) and translating it. Then run/machineengine reload config.
machineengine:
machine:
chunk_limit:
'<red>Ce chunk contient déjà %count% machines (limite %limit%).'
wrench:
busy:
type: ACTION_BAR
message: '<red>La machine est occupée ; réessayez'- Colors: MiniMessage
tags. Write
\<for a literal<. - Values:
%count%,%limit%… are filled in by MachineEngine. A value is shown as it is: a player name can't bring its own colors or click actions. - Where it shows: a message is a chat message unless its entry says
otherwise.
type: ACTION_BAR,TITLE,BOSS_BAR,SOUNDor a list of them send it elsewhere.
Which language a player gets
- The file of their client's language (
fr_ca.ymlfor a Québec client); - else another country of the same language (
fr_fr.yml); - else
messages.default-languageinconfig.yml(en_usby default).
A message missing from a language's file falls back to the default language. The console reads the default language.
messages.prefix in config.yml is put before every chat message, e.g.
"<dark_gray>[<gold>Machines</gold>]</dark_gray> ". See the
configuration reference.
Item lore and the settings menu
Item stacks and menus are shared by everyone who sees them, so their text is translated on each player's client instead, as a CraftEngine translation:
lang:
en_us:
machineengine.lore.energy: '<gray>Energy: %s / %s %s'
fr_fr:
machineengine.lore.energy: '<gray>Énergie : %s / %s %s'- Arguments:
%s, in order;%1$s,%2$sto reorder them. - After editing, run
/ce reload allso CraftEngine rebuilds the resource pack. - Players without the resource pack see the English text built into MachineEngine.
Updates never overwrite either file. New messages are added to en_us.yml
on their own. For lang.yml, delete it and restart to get the new keys back
(copy your edits first).
Menu text
Machine menu titles and button names are in the zMenu files in
plugins/MachineEngine/menus/. See Machine menus.
Addons ship their own translations (Mekanized's are in
plugins/CraftEngine/resources/mekanized/).
Last updated on