Skip to content

Language‐Files.md

Fragmer2 edited this page Apr 8, 2026 · 5 revisions

Language Files Guide

Supported Languages

Code Language Status
en English Complete
ru Русский Complete
ua Українська Complete
es Español Complete
de Deutsch Complete
fr Français Complete
zh 中文 Complete
pt Português Complete
pl Polski Complete
it Italiano Complete

Format codes: §l bold · §o italic · §n underline · §m strikethrough · §r reset


Creating a Custom Language

  1. Copy en.yml to a new file — e.g. ja.yml
  2. Translate all values (right side of each line)
  3. Keep all keys (left side) unchanged
  4. Keep all placeholders (%player%, etc.) in place
  5. Keep color codes (§6, etc.) or replace with different ones
  6. Save as UTF-8
  7. Set language: ja in config.yml
  8. Run /reloadchestconfig

Rules

Keep placeholders:

# Correct
chest-activating: "§6✦ §f%player% hat eine Truhe aktiviert!"

Wrong — placeholder removed

chest-activating: "§6✦ Eine Truhe wurde aktiviert!"

Keep list structure for lore:

lore:
  - "§7First line"
  - "§7Second line"
  - ""
  - "§8Third line after blank"

Save as UTF-8 — especially important for non-Latin scripts (Russian, Chinese, Arabic, Japanese, etc.).


Common Issues

Message shows the key instead of text

Player sees: gui.save-button

A key is missing from your language file. Add it:

gui:
  save-button: "§aSave"

Weird characters (æ, â, ë)

File not saved as UTF-8. Open in VS Code or Notepad++ and convert encoding.

Placeholder not replaced

Player sees: "Opened %tier% chest"

Typo in the placeholder — check spelling exactly: %tier% not %Tier% or %teir%.


Contributing a Translation

  1. Fork the repository on GitHub
  2. Copy en.yml to your language code (e.g. ja.yml)
  3. Translate all keys
  4. Test in-game
  5. Submit a pull request

Requirements: complete translation, UTF-8 encoding, tested in-game.


Questions?

  • Discord — #translations channel
  • GitHub Issues — include the language code and message key
# Language Files Guide

Supported Languages

Code Language Status
en English Complete
ru Русский Complete
ua Українська Complete
es Español Complete
de Deutsch Complete
fr Français Complete
zh 中文 Complete
pt Português Complete
pl Polski Complete
it Italiano Complete

Changing Language

Edit plugins/SpawnChestPlugin/config.yml:

language: ru

Apply with /reloadchestconfig.


File Locations

plugins/SpawnChestPlugin/lang/
├── en.yml
├── ru.yml
├── ua.yml
├── es.yml
├── de.yml
├── fr.yml
├── zh.yml
├── pt.yml
├── pl.yml
└── it.yml

Files are created automatically on first run. Edit any file freely — /reloadchestconfig picks up changes immediately.


File Structure

Language files are organised into sections. Each section covers a different part of the plugin.

# System messages (server log — not shown to players)
system:
  plugin-enabled: "[SpawnChest] SpawnChestPlugin v4.4 enabled."
  timer-first-run: "[SpawnChest] First run — chest will spawn in 30 seconds."

# Broadcasts sent to players in chat
broadcasts:
  chest-spawned: "§6✦ §e%tier% §7has appeared §8— §fX: %x%  Y: %y%  Z: %z%"
  chest-activating: "§6✦ §f%player% §7activated a chest §8— §eopens in §f%seconds%s"
  chest-unlocked: "§6✦ §eThe chest is now open!"

# BossBar titles
bossbar:
  countdown-minutes: "§6✦  §7Next chest  §8·  §f%minutes%m %seconds%s"
  active-with-timer: "§6✦  §e%tier%  §8·  §f%x%, %y%, %z%  §8·  %time%"

# Admin/player command feedback
commands:
  no-permission: "§7You don't have permission to do that."
  next-chest: "§7Next chest in §e%minutes%m %seconds%s§7."

# Item names and lore
items:
  dragon-slayer-sword:
    name: "§6Dragon Slayer"
    lore:
      - "§7Forged from the heart of a dragon."
      - ""
      - "§e+%damage% §7bonus damage"

# GUI labels
gui:
  custom-loot-title: "§8Custom Chest Loot"
  save-button: "§aSave"

# Chest interaction messages
chest:
  locked: "§7This chest is locked — right-click to start the countdown."
  already-activating: "§7Opens in §e%seconds%s§7."

Placeholders

Placeholder Replaced with Example
%player% Player name Steve
%tier% Chest tier name Legendary Chest
%x% %y% %z% Coordinates 825, 64, -1456
%minutes% %seconds% Time values 3, 42
%count% Item or player count 15
%damage% Damage value 4.0
%cooldown% Cooldown in seconds 3
%time% Formatted time string 3m 42s
%type% Chest type Double Chest
%fraction% Drop rate 1/3 of items

Color Codes

Code Color
§6 Gold
§e Yellow
§f White
§7 Grey
§8 Dark grey
§a Green
§c Red
§b Aqua
§9 Blue
§d Pink/purple

Format codes: §l bold · §o italic · §n underline · §m strikethrough · §r reset


Creating a Custom Language

  1. Copy en.yml to a new file — e.g. ja.yml
  2. Translate all values (right side of each line)
  3. Keep all keys (left side) unchanged
  4. Keep all placeholders (%player%, etc.) in place
  5. Keep color codes (§6, etc.) or replace with different ones
  6. Save as UTF-8
  7. Set language: ja in config.yml
  8. Run /reloadchestconfig

Rules

Keep placeholders:

# Correct
chest-activating: "§6✦ §f%player% hat eine Truhe aktiviert!"

# Wrong — placeholder removed
chest-activating: "§6✦ Eine Truhe wurde aktiviert!"

Keep list structure for lore:

lore:
  - "§7First line"
  - "§7Second line"
  - ""
  - "§8Third line after blank"

Save as UTF-8 — especially important for non-Latin scripts (Russian, Chinese, Arabic, Japanese, etc.).


Common Issues

Message shows the key instead of text

Player sees: gui.save-button

A key is missing from your language file. Add it:

gui:
  save-button: "§aSave"

Weird characters (æ, â, ë)

File not saved as UTF-8. Open in VS Code or Notepad++ and convert encoding.

Placeholder not replaced

Player sees: "Opened %tier% chest"

Typo in the placeholder — check spelling exactly: %tier% not %Tier% or %teir%.


Contributing a Translation

  1. Fork the repository on GitHub
  2. Copy en.yml to your language code (e.g. ja.yml)
  3. Translate all keys
  4. Test in-game
  5. Submit a pull request

Requirements: complete translation, UTF-8 encoding, tested in-game.


Questions?

Clone this wiki locally