Skip to main content

Languages

GroupManager includes a built-in translation system supporting multiple languages. All player-facing messages — commands, group notifications, UI text — are fully translatable.

Supported Languages

CodeLanguageFile
es-USEspañol (Paraguay)lang/es-US.json
en-PYEnglish (US)lang/en-PY.json
pt-BRPortuguês (Brasil)lang/pt-BR.json

The default language is set in config.json via the Language key.

Translation Files

Translation files are JSON files located in mods/groupmanager/lang/:

lang/en-US.json
{
"group.created": "Group created! You are the leader.",
"group.disbanded": "The group has been disbanded.",
"group.invite.sent": "Invitation sent to {0}.",
"group.invite.received": "{0} invited you to their group.",
"group.invite.accepted": "{0} accepted the invitation.",
"group.member.joined": "{0} joined the group.",
"group.member.left": "{0} left the group.",
"commands.player_only": "This command can only be used by players.",
"commands.no_permission": "You don't have permission to use this command."
}

Placeholders

Translation strings support indexed placeholders:

PlaceholderDescription
{0}First argument (usually a player name)
{1}Second argument
{2}Third argument

Example: "group.invite.sent": "Invitation sent to {0}."{0} is replaced with the target player's name.

Adding a New Language

  1. Create a new JSON file in mods/groupmanager/lang/ (e.g., fr.json).
  2. Copy all keys from en.json and translate the values.
  3. Set "Language": "fr" in config.json.
  4. Reload the plugin.

Fallback System

If a translation key is missing from the current language file:

  1. The system checks the embedded default translations (hardcoded in the plugin).
  2. If still not found, the raw key name is returned as a fallback.

This ensures the plugin always has a message to display, even with incomplete translation files.

Hot-Reload

Translations can be reloaded at runtime by admins with the groupmanager.admin.reload permission, without restarting the server.