WandWorks

Messages and language

Editing every message the plugin sends, adding your own translation, and the full list of keys.

Every player facing string lives in a language file, and so do the console lines. Nothing is hardcoded.

Picking a language

language: en_US

Names a file in plugins/WandWorks/lang/, without the .yml. Three ship translated and are rewritten on every start, so a mistake in one is one delete away from being fixed.

ValueFile
en_US, or the old short name enen_US.yml
fr_FR, or the old short name frfr_FR.yml
es_ES, or the old short name eses_ES.yml

A name that matches no file falls back to en_US with a console warning.

Adding your own translation

Copy a shipped file

Copy en_US.yml to a new name in the same folder, for example de_DE.yml.

Translate the values

Only the values. Leave the keys and the {placeholders} exactly as they are.

Point at it

Set language: de_DE in config.yml, then /wandworks reload.

The three shipped files are rewritten with their defaults merged in on every start, so give yours a different name. A file WandWorks did not ship is left completely alone, which also means it gets no new keys on an update. A missing key prints as a visible "Missing language key" line rather than nothing, so you can see what to add.

The prefix

prefix: "&8[&aWandWorks&8] &r"

Goes in front of every player message. Set it to "" to drop it. {prefix} also works inside any message if you want it somewhere other than the start.

Switching a message off

Set a message to an empty string and it is not sent at all.

wand:
  broke: ""

The action still happens, the player just hears nothing about it.

Colours

Legacy ampersand codes plus &#RRGGBB for hex:

success: "&#4ade80Sold &f{items} &#4ade80items for &f{money}&#4ade80."

Console lines have their colour stripped before printing, since a console is not a chat window.

The keys

Two keys nothing reads

The shipped files carry general.player-only and wand.uses-left. Neither is sent by anything in the current release, so editing them changes nothing. They are listed here so you do not spend an evening wondering why your new wording never shows up.

Versioning

Every language file carries a config-version at the top. That is how a new key from an update merges into the file you have already translated, leaving your wording alone. Leave it as it is.

On this page