book-openLocales

Locales control all player-facing Zentrix messages. You control wording, tone, and language. Nothing is locked behind hardcoded text.

What the Locales system does

Zentrix loads messages from locale files instead of hardcoding text.

  • Messages live in files inside plugins/Zentrix/locales/.

  • Messages appear in chat, titles/subtitles, action bars, and other Zentrix UI.

  • You can edit messages to change wording and style.

  • You can keep multiple locale files for different languages.

  • The active locale is server-wide. It decides what language players see.

Key features

  • Full message customization for your server’s tone and branding.

  • Multi-language support by keeping multiple locale files.

  • Color support, including legacy & colors and hex colors.

  • Placeholder replacement for dynamic values (players, stats, arena, timers).

  • Optional styling like small-caps text for a consistent look.

  • Global prefix so messages stay consistent across features.

  • Reload support so you can apply changes without restarting the server.

circle-info

If you change a locale file, use /zx reload to apply it instantly.

Why this system exists

Locales exist so you can ship a polished experience.

  • Support servers in any language.

  • Match your server’s tone, theme, and branding.

  • Keep messaging consistent across all Zentrix features.

  • Update text without touching plugin code.

Creating a custom locale

You create a custom locale by adding a new locale file. Zentrix reads it on load.

Workflow:

  1. Add your locale file to plugins/Zentrix/locales/.

  2. Use the file name to select it in settings.yml.

  3. Run /zx reload to apply the change.

Example:

  • Your locale file is named es.yml.

    • The locale name is es (file name without .yml).

  • In settings.yml, set locale.file to es.yml:

  • Run /zx reload to apply it.

For the exact setting location, see settings.yml.

When messages are used (message lifecycle)

Zentrix follows a predictable lifecycle:

  • Locale files load when the plugin starts.

  • When a message is needed, Zentrix fetches it from the active locale.

  • Placeholders resolve using the current context (player, match state, values).

  • Colors and styling apply consistently.

  • The global prefix is added (when applicable).

  • Reloading refreshes loaded messages instantly.

Message formatting concept

Zentrix references messages by identifiers, not hardcoded text.

This unlocks three things:

  • Consistency: the same message style everywhere.

  • Dynamic text: placeholders inject live values.

  • Safe customization: you can rewrite messages without touching code.

For placeholder usage on your server (scoreboards, menus, chat formats), see Placeholders.

Best practices

  • Keep translations clear. Prefer natural phrasing over literal word swaps.

  • Maintain one “base” locale. Duplicate it for new languages.

  • Test changes in-game. Check colors, spacing, and placeholder output.

  • Reload after edits to confirm everything renders as expected.

Last updated