-
Notifications
You must be signed in to change notification settings - Fork 0
Languages
Multi-language support guide for GlowPlayersPro.
GlowPlayersPro supports multiple languages and allows you to easily add new languages. Language files are located in the plugins/GlowPlayersPro/languages/ folder.
| Language | File | Code |
|---|---|---|
| English | en.yml |
en |
| Portuguese | pt.yml |
pt |
In the config.yml file, set the desired language:
language: "en"subcommands:
off-cmd: "OFF"
neon-cmd: "NEON"
reload-cmd: "RELOAD"
clearall-cmd: "CLEARALL"These names are used in commands. For example, in Portuguese:
subcommands:
off-cmd: "DESLIGAR"
neon-cmd: "NEON"
reload-cmd: "RECARREGAR"
clearall-cmd: "LIMPARTUDO"Important: Subcommand names must be single words without spaces. Names with spaces will break both the command and tab completion.
colors:
BLACK: "BLACK"
DARK_BLUE: "DARK_BLUE"
DARK_GREEN: "DARK_GREEN"
DARK_AQUA: "DARK_AQUA"
DARK_RED: "DARK_RED"
DARK_PURPLE: "DARK_PURPLE"
GOLD: "GOLD"
GRAY: "GRAY"
DARK_GRAY: "DARK_GRAY"
BLUE: "BLUE"
GREEN: "GREEN"
AQUA: "AQUA"
RED: "RED"
LIGHT_PURPLE: "LIGHT_PURPLE"
YELLOW: "YELLOW"
WHITE: "WHITE"messages:
prefix: "&8[&bGlowPlayersPro&8] "
no-permission: "&cYou don't have permission to use this command"
only-players: "&cThis command can only be executed by players"
glow-enabled: "&aGlow effect enabled with color: {color}"
glow-disabled: "&eGlow effect disabled"
neon-enabled: "&dNEON effect enabled"
invalid-color: "&cInvalid color! Use /glow <color>, /glow {neon} or /glow {off}"
config-reloaded: "&aConfiguration reloaded successfully"
player-not-found: "&cPlayer not found"
glow-removed-other: "&eYou removed the glow effect from &b{player}&e"
glow-cleared-all: "&6All glow effects have been removed and the database has been cleared"
available-colors: "&bAvailable colors: &f{colors}"
invalid-default-color: "&cError: Default color '{color}' in config.yml is invalid"
on-cooldown: "&cPlease wait &e{seconds}s &cbefore changing your glow again"Copy the en.yml file to a new file with the desired language name:
cp plugins/GlowPlayersPro/languages/en.yml plugins/GlowPlayersPro/languages/de.ymlEdit the new file and translate all messages:
# GlowPlayersPro - German Language File
subcommands:
off-cmd: "OFF"
neon-cmd: "NEON"
reload-cmd: "RELOAD"
clearall-cmd: "CLEARALL"
colors:
BLACK: "BLACK"
DARK_BLUE: "DARK_BLUE"
DARK_GREEN: "DARK_GREEN"
# ... continue with all colors
messages:
prefix: "&8[&bGlowPlayersPro&8] "
no-permission: "&cYou don't have permission to use this command"
only-players: "&cThis command can only be executed by players"
glow-enabled: "&aGlow effect enabled with color: {color}"
glow-disabled: "&eGlow effect disabled"
# ... continue with all messagesIn the config.yml file, change the language:
language: "de"Restart the server to load the new language.
Use & followed by a hex character:
&a → Green
&c → Red
&f → White
Use &# followed by 6 hex characters:
&#FF0000 → Red
�FF00 → Green
�FF → Blue
glow-enabled: "�FF00Glow effect enabled with color: {color}"Some messages support dynamic placeholders:
| Placeholder | Description |
|---|---|
{color} |
Glow color |
{player} |
Player name |
{neon} |
Translated neon command name |
{off} |
Translated off command name |
{seconds} |
Remaining cooldown time |
{colors} |
List of available colors |
Some messages are used only by the system and don't appear to players:
messages:
system:
enabled: "GlowPlayersPro enabled successfully"
disabled: "GlowPlayersPro disabled"
update-available: "A new version is available: {version}"
update-download: "Download at: {url}"
update-error: "Unable to check for updates: {error}"
message-not-found: "Message not found: {path}"
placeholderapi-registered: "PlaceholderAPI expansion registered successfully!"
placeholderapi-not-found: "PlaceholderAPI not found - placeholders will not be available"
language-file-not-found: "Language file {lang}.yml not found in languages folder! Falling back to en.yml"
could-not-create-data: "Could not create {file}! {error}"
could-not-save-data: "Could not save {file}! {error}"
config-outdated: "Your config.yml is outdated (version {current}, latest is {latest}). Back it up, delete it, and restart to get new options."- Check if the file exists in the
languages/folder - Check if the filename matches the code in
config.yml - Check if the YAML is valid (correct indentation)
- Check the console for error messages
- Check if colors use the correct format (
&aor&#FFFFFF) - Check if there are no special characters in colors
- Test with simple colors first
- Check if the names are translated correctly
- Check if the names don't have extra spaces
- Test with English names first