Internationalization (i18n) Guide
PvPIndex Factions supports locale bundles under src/main/resources/messages/.
Shipped Locales
enesdefrpt-BRjazhru
How Locale Resolution Works
Message lookup order is:
- Player-selected locale (
/f language <code>) - Server default locale (
factions.language.defaultinconfig.yml) - English locale (
en) - Inline Java fallback text
Add a New Language
- Fork the repository.
- Create a new file:
src/main/resources/messages/messages_<locale>.yml. - Copy
messages_en.ymlas the base template. - Translate every value, but do not change keys.
- Preserve placeholders exactly:
{name},{faction},{amount}, etc.- MiniMessage tags like
<red>,<click:...>,<hover:...>.
- Keep YAML structure and indentation intact.
- Run tests:
mvn test
- Commit with a clear message:
feat(i18n): add <locale> locale bundle
- Open a pull request and list:
- Locale code
- Coverage notes (fully translated or known gaps)
Translation Rules
- Do not rename, remove, or add placeholders.
- Do not remove MiniMessage formatting tags unless intentionally changing style.
- Keep clickable/hover text valid MiniMessage.
- Prefer natural language for Minecraft players over literal machine translation.