Skip to content

Languages

language: "en"

That is the whole setup. The file it names lives in plugins/EmberEssentials/lang/.

Seven languages, all complete

Every string the plugin can say to a player goes through the language system, and every one of them is translated in all seven files.

Language File Messages
English en.yml 515
Deutsch de.yml 515
Español es.yml 515
Français fr.yml 515
Português (Brasil) pt_BR.yml 515
Русский ru.yml 515
简体中文 zh_CN.yml 515

Switching language changes the whole plugin, not the handful of messages a partial translation usually covers.

Machine-assisted, and open to correction

These were produced with machine assistance rather than by professional translators, then checked automatically: every message must keep the same numbered values and the same colour tags as the English, and must not contain words left behind from another language.

They are good, not perfect. A native speaker will find phrasing to improve, and corrections are welcome - see the bottom of this page.

Fallback is per key, not per file

A missing message falls back to English on its own. Delete a line you dislike and that one message reverts; the rest of the file keeps working. That also means a translation for a newer version of the plugin never breaks on an older one - anything it has not got yet simply reads in English.

A key that exists nowhere at all comes back as itself. Seeing kit-command.claimed in chat is a bug report; a blank line is a mystery.

What is in a message

home-command:
  "home-set": "<#66bb6a>Zuhause <white>%0%<#66bb6a> gesetzt."

Colour tags. Every string is MiniMessage, so a translator controls the emphasis, not only the words. A German sentence stresses a different clause than the English one, and hard-coding the colours would take that choice away.

Numbered values. %0%, %1% and so on are filled in by the plugin in the order it supplies them - a name, a count, an amount. They are numbered rather than named precisely so you can move them: put each one wherever your language needs it in the sentence. German puts the verb last and Chinese puts the subject first, and both are handled by moving the number rather than by gluing English fragments together in code.

A message that loses one of its numbers loses that piece of information, so keep them all.

Command names stay English. /warp is /warp in every language. Anything the player literally types is left alone; only the words around it change.

Editing

lang/en.yml is rewritten on every start, so it always lists every key the version you are running can say. Every other file is unpacked once and then never touched, so your edits are safe.

Keys are grouped by the command or screen they belong to, so you can work through one part of the plugin at a time rather than an alphabetical soup.

Adding a language

Copy en.yml to the code you want - it.yml, nl.yml, ja.yml - translate the values, and set language: to match. Nothing else is needed; the plugin reads whatever file the setting names.

If you translate one, send it. It ships in the next version with credit, and every server running that language gets it. The same goes for corrections to the seven above.