Localization
The Info Hub supports multiple languages and full UI text customization.
Folder Structure
plugins/InfoHub/localization/
├── en-US.json # English (default)
├── de-DE.json # German
└── [custom].json # Your custom language
Adding a New Language
- Copy an existing file (e.g.,
en-US.json) - Rename to your language code (e.g.,
fr-FR.json) - Translate all values
- Set
languageinconfig.jsonto the new code
{
"language": "fr-FR"
}
Translation Keys
Hub Main Page
{
"_localization_version": "1",
"hub.title": "Info Hub",
"hub.welcome": "Welcome, {player}!",
"hub.search.placeholder": "Search commands, rules, FAQ...",
"hub.search.button": "Search",
"hub.search.no_results": "No results found"
}
Sections
{
"hub.section.commands": "Commands",
"hub.section.commands.description": "All server commands",
"hub.section.rules": "Rules",
"hub.section.rules.description": "Server rules",
"hub.section.faq": "FAQ",
"hub.section.faq.description": "Frequently asked questions",
"hub.section.serverinfo": "Server Info",
"hub.section.serverinfo.description": "Server information and links",
"hub.section.team": "Team",
"hub.section.team.description": "Meet our team"
}
Commands Section
{
"commands.title": "Commands",
"commands.execute": "Execute",
"commands.execute.confirm": "Are you sure?",
"commands.aliases": "Aliases",
"commands.permission": "Permission",
"commands.usage": "Usage",
"commands.no_permission": "You don't have permission for this command"
}
Rules Section
{
"rules.title": "Server Rules",
"rules.consequence": "Consequence",
"rules.severity.low": "Info",
"rules.severity.medium": "Warning",
"rules.severity.high": "Severe",
"rules.severity.critical": "Critical"
}
FAQ Section
{
"faq.title": "FAQ",
"faq.questions": "Questions",
"faq.count": "{count} Questions",
"faq.search.placeholder": "Search FAQ...",
"faq.expand_all": "Expand All",
"faq.collapse_all": "Collapse All"
}
Team Section
{
"team.title": "Team",
"team.members": "Members",
"team.online": "Online",
"team.offline": "Offline",
"team.refresh": "Refresh"
}
Navigation
{
"nav.back": "Back",
"nav.prev": "Previous",
"nav.next": "Next",
"nav.page": "Page {current}/{total}",
"nav.close": "Close"
}
Messages
{
"message.no_permission": "You don't have permission for this.",
"message.reloaded": "Info Hub configuration reloaded.",
"message.error": "An error occurred.",
"message.link_copied": "Link copied to chat!"
}
Placeholders
| Placeholder | Description |
|---|---|
{player} | Player name |
{count} | Number (e.g., commands, rules) |
{current} | Current page number |
{total} | Total page count |
{name} | Dynamic name |
{command} | Command name |
Complete Example (German)
{
"_localization_version": "1",
"hub.title": "Info Hub",
"hub.welcome": "Willkommen, {player}!",
"hub.search.placeholder": "Suche Commands, Regeln, FAQ...",
"hub.search.button": "Suchen",
"hub.search.no_results": "Keine Ergebnisse gefunden",
"hub.section.commands": "Commands",
"hub.section.commands.description": "Alle Server-Befehle",
"hub.section.rules": "Regeln",
"hub.section.rules.description": "Server-Regeln",
"hub.section.faq": "FAQ",
"hub.section.faq.description": "Häufig gestellte Fragen",
"hub.section.serverinfo": "Server Info",
"hub.section.serverinfo.description": "Server-Informationen und Links",
"hub.section.team": "Team",
"hub.section.team.description": "Unser Team",
"commands.title": "Commands",
"commands.execute": "Ausführen",
"commands.aliases": "Aliase",
"commands.permission": "Berechtigung",
"rules.title": "Server-Regeln",
"rules.consequence": "Konsequenz",
"rules.severity.low": "Info",
"rules.severity.medium": "Warnung",
"rules.severity.high": "Schwer",
"rules.severity.critical": "Kritisch",
"faq.title": "FAQ",
"faq.expand_all": "Alle ausklappen",
"faq.collapse_all": "Alle einklappen",
"team.title": "Team",
"team.online": "Online",
"team.offline": "Offline",
"nav.back": "Zurück",
"nav.prev": "Vorherige",
"nav.next": "Nächste",
"nav.page": "Seite {current}/{total}",
"message.no_permission": "Du hast keine Berechtigung dafür.",
"message.reloaded": "Info Hub Konfiguration neu geladen."
}
Best Practices
- Keep translations consistent - Use same terminology
- Test in-game - Some strings may be too long
- Include placeholders - Don't remove
{player}etc. - Version your translations - Update
_localization_version