> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rpg-leveling.zuxaw.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Translation System

> How to translate and localize the RPG Leveling plugin.

# Translation System

The RPG Leveling plugin supports **full translation and localization**. All messages, notifications, commands, and GUI elements can be translated into your preferred language.

## How to Translate

Translation files are located at:

```
mods/Zuxaw_RPGLeveling/MessagesLanguageMapping.json
```

The `MessagesLanguageMapping.json` file is **automatically generated** when the server starts for the first time. It contains all translatable text in the plugin with English as the default language.

## Creating Your Translation

1. **Locate the MessagesLanguageMapping.json file** - After running the server once, find it at `mods/Zuxaw_RPGLeveling/MessagesLanguageMapping.json`
2. **Edit the translations** - Open the file and translate each message **value** to your language
3. **Keep the keys unchanged** - Only translate the text values, never modify the keys (e.g. keep `"level_up"` as is, only change the message text)
4. **Restart the server** - After saving your changes, restart the server to apply the translations

## Translation Guidelines

* **Text Wrapping** - If translated text doesn't fit or wrap properly in the GUI/HUD, use shorter or alternative phrasing. The plugin doesn't automatically adjust text size.
* **Preserve Formatting** - Some messages contain placeholders like `{level}`, `{xp}`, `{player}`, etc. Keep these **exactly as they are** - they are replaced with actual values by the plugin.
* **Test Your Translation** - After translating, test all features (commands, GUI, HUD, notifications) to ensure everything displays correctly.

## Troubleshooting Translation Issues

If you encounter bugs or issues with your translation file:

1. **Download the fresh MessagesLanguageMapping.json** - Get a clean copy from the latest release
2. **Delete your modified file** - Remove your custom `mods/Zuxaw_RPGLeveling/MessagesLanguageMapping.json`
3. **Restart the server** - The plugin will automatically generate a new default `MessagesLanguageMapping.json`
4. **Re-apply your translations** - Start fresh with your translations on the new file

**Important:** Both translation updates and configuration updates require a **server restart** to take effect. Changes to `mods/Zuxaw_RPGLeveling/MessagesLanguageMapping.json` or `mods/Zuxaw_RPGLeveling/RPGLevelingConfig.json` while the server is running will not apply until you restart.

## Sharing Your Translation

If you create a translation for your language, consider sharing it with the community on our [Discord](https://discord.gg/nGDQbjMtxY) server.
