Languages
CommandPanels supports basic message translation through a lang.yml
file. This allows you to customise and translate messages sent by the plugin including errors, warnings, and informational messages.
Other than errors, warning and informational messages, panel command tags and other features will generally avoid sending dynamic chat messages to allow users to define and send their own custom messages (only if you want a message sent).
Where to place it
Create a file called lang.yml
in the CommandPanels plugin data folder, next to config.yml
.
Example structure:
/plugins/CommandPanels/
├── config.yml
├── lang.yml
├── panels/
Languages Example
Here's a sample lang.yml
:
"CommandPanels": "Paneles de Comando"
"No Permission": "No tienes permiso para hacer eso"
"Panel Opened": "Has abierto un panel"
"Invalid Input": "Entrada no válida"
If CommandPanels sends a message that matches a key in your lang.yml
, it will replace it with your translated value. You still need to maintain YAML file syntax, avoid using symbols in the keys (english side), they are not relevant when checking for matches.
How it works
- The plugin compares the full text of a message to the keys in your
lang.yml
. - If a match is found, it uses your translation instead.
- Matches do not need to be exact, comparison will ignore symbols, spacing, and are case insensitive.
- If no match is found, the original message is sent.
Notes
- Formatting codes and placeholders will not be converted, this system is mainly for static message overrides.
- You can create language variants by backing up and switching out
lang.yml
files manually. - Someone might have already created a lang file in your langauage and shared it!