Languages & Messages
Every line IgniteSky sends - chat, menus, titles, the boss bar - comes from a language file in lang/, so you can retranslate or reword the entire plugin without touching code. Players can pick their own language, and IgniteSky can adopt their client locale automatically.
How it works
lang/<code>.yml holds every message keyed by id. lang/en.yml ships by default. The text is MiniMessage, so colours, gradients and hover/click all work, and messages take {placeholder} values that IgniteSky fills in.
messages:
default-language: en # lang/<code>.yml used for players without a chosen/ detected one
languages: # the codes players may choose with /is language
- en
auto-detect-language: true # adopt a player's client locale on first join if it is installed
number-format: "#,##0.##" # Java DecimalFormat pattern for worth/level/bank placeholders
date-format: "yyyy-MM-dd HH:mm" # DateTimeFormatter pattern for date placeholdersChoosing a language
| Command | What it does |
|---|---|
/is language | Open the language picker |
/is language <code> | Switch to a specific language |
A player's choice is saved in their personal preferences and used for everything they see. With auto-detect-language on, a player who has never chosen one gets their Minecraft client language on first join - provided that code is installed and listed - otherwise they fall back to default-language.
Adding a translation
Copy the default
Copy
lang/en.ymltolang/<code>.yml(for examplelang/de.yml).Translate the values
Translate each message value. Keep the
{placeholders}and MiniMessage tags intact; only change the words.Set its display name
Set the
language.displaykey inside the new file - that is the name shown in the/is languagepicker.List the code
Add the code to
messages.languagesinconfig.yml, then/is admin reload.
Number and date formatting
Worth, level and bank placeholders run through number-format (a Java DecimalFormat pattern, e.g. #,##0.##), and date placeholders through date-format (a DateTimeFormatter pattern). Grouping and decimal symbols follow the default-language locale, so a European locale shows 1.234,5 where en shows 1,234.5.
Menu titles, icon names and lore default to the language file, so translating lang/<code>.yml localises the menus as well. You only reach for the menu layout files when you want to change a name or icon beyond translation.