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
| Code | Language | File |
|---|---|---|
es-US | Español (Paraguay) | lang/es-US.json |
en-PY | English (US) | lang/en-PY.json |
pt-BR | Portuguê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:
| Placeholder | Description |
|---|---|
{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
- Create a new JSON file in
mods/groupmanager/lang/(e.g.,fr.json). - Copy all keys from
en.jsonand translate the values. - Set
"Language": "fr"inconfig.json. - Reload the plugin.
Fallback System
If a translation key is missing from the current language file:
- The system checks the embedded default translations (hardcoded in the plugin).
- 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.