Language Files - Shopkeepers/Shopkeepers-Wiki GitHub Wiki
Default translations
The by default supported/included languages are currently:
- English (
en-default
, default) - German (
de
)
You can switch to a different translation by changing the language
setting inside the Configuration. For example, set it to language: de
to use the included german translation.
For all other languages we rely on community contributions!
For any other language you will have to either create your own translation, or check out the Shopkeepers Language-Files project if someone else has already created a translation for your language and your version of Shopkeepers. If no such translation exists yet, or the existing one has errors, consider contributing!
Using custom language files
Language files follow the naming pattern language-<languageCode>.yml
and are located in the lang
folder inside the Shopkeepers plugin folder. The plugin's included language files are written to this folder the first time you select them inside the config.
The default language file language-en-default.yml
is always written to this folder and cannot be modified: It is automatically overwritten on every plugin startup and acts as a template for your own custom language files. If you want to translate or modify the default messages:
- Copy the default language file and give it a distinct name, eg.
language-en-custom.yml
. The name has to follow the above mentioned naming scheme. - Change the messages to your liking inside this new language file.
- Select your language file inside the config by changing the setting to
language: <languageCode>
, eg.language: en-custom
. - Reload the plugin.
- Check the server log: The plugin will try to detect issues with your language file, such as missing messages or unexpected additional messages. If issues are found, the plugin may switch back to using the default language file until you have resolved these issues.
Text styling
You can use &
-based color and formatting codes to apply styling to your messages. For example, &c
will colorize any subsequent text red.
You can also apply hex colors, either via Bukkit's hex format (&x&a&a&b&b&c&c
) or via the more compact hex format (&#aabbcc
).
Other text features (fonts, hover events, text interactions, ...) are not yet supported.
Troubleshooting
Make sure to encode your custom language file in UTF8. The text editor Notepad++ for example allows you to easily determine and change the encoding of your language file. Try to use UTF8 right from the beginning, before creating your translation or copying one into the file, because changing the file encoding in retrospect might break certain characters.