Skip to content

Languages

Narcilioo edited this page Jul 23, 2026 · 1 revision

Languages

Multi-language support guide for GlowPlayersPro.

Overview

GlowPlayersPro supports multiple languages and allows you to easily add new languages. Language files are located in the plugins/GlowPlayersPro/languages/ folder.

Included Languages

Language File Code
English en.yml en
Portuguese pt.yml pt

Setting the Language

In the config.yml file, set the desired language:

language: "en"

Language File Structure

Subcommand Names

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.

Color Names

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

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"

Adding a New Language

Step 1: Copy an Existing File

Copy the en.yml file to a new file with the desired language name:

cp plugins/GlowPlayersPro/languages/en.yml plugins/GlowPlayersPro/languages/de.yml

Step 2: Translate the Messages

Edit 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 messages

Step 3: Configure the Language

In the config.yml file, change the language:

language: "de"

Step 4: Restart the Server

Restart the server to load the new language.

Color Format

Legacy Colors

Use & followed by a hex character:

&a → Green
&c → Red
&f → White

Hex Colors

Use &# followed by 6 hex characters:

&#FF0000 → Red
&#00FF00 → Green
&#0000FF → Blue

Example Message with Colors

glow-enabled: "&#00FF00Glow effect enabled with color: {color}"

Placeholders

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

System Messages

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."

Troubleshooting

Language Doesn't Load

  1. Check if the file exists in the languages/ folder
  2. Check if the filename matches the code in config.yml
  3. Check if the YAML is valid (correct indentation)
  4. Check the console for error messages

Messages with Broken Colors

  1. Check if colors use the correct format (&a or &#FFFFFF)
  2. Check if there are no special characters in colors
  3. Test with simple colors first

Subcommands Don't Work

  1. Check if the names are translated correctly
  2. Check if the names don't have extra spaces
  3. Test with English names first