Internationalization
Provide Multilingual Item Experience for Global Players
Introduction
Zaphkiel has built-in internationalization support, enabling your server to provide a localized item experience for players from around the world. The system automatically displays item names, descriptions, and interaction information in the appropriate language based on the player's client language settings.
Key Advantages
- 🌐 Global Support - Covers all language regions supported by Minecraft
- 🔍 Automatic Detection - No manual setup required; the system automatically recognizes player language
- 🛡️ Fault Tolerance - Automatically displays default language content when translations are missing
- 📋 Comprehensive Localization - Item names, descriptions, and interaction events can all be localized
- ⚙️ Simple Configuration - Manage all language versions through standard YAML format
Language Configuration
Basic Syntax
Use the i18n node to organize content for different languages:
healing_potion:
display: potion_display
icon: potion
# Default language content
name:
item_name: '&aHealing Potion'
lore:
item_category: '&7Consumable'
item_effect: '&fRestores health'
event:
on_use: |
tell 'Health restored!'
# Multilingual content
i18n:
zh_cn:
name:
item_name: '&a治疗药剂'
lore:
item_category: '&7消耗品'
item_effect: '&f恢复生命值'
event:
on_use: |
tell '生命值已恢复!'Language Code Reference
Based on Minecraft Wiki language standards, supported language codes include:
| Code | Language | Region |
|---|---|---|
zh_cn | Simplified Chinese | China |
zh_tw | Traditional Chinese | China Taiwan |
en_us | English | United States |
ja_jp | Japanese | Japan |
ko_kr | Korean | South Korea |
fr_fr | French | France |
de_de | German | Germany |
es_es | Spanish | Spain |
pt_br | Portuguese | Brazil |
ru_ru | Russian | Russia |
Configuration Examples
Item Attribute Localization
Provide multilingual versions for various item attributes:
i18n:
fr_fr:
name:
item_name: '&bÉpée Magique'
item_rarity: '&6Légendaire'
lore:
item_type: '&9Arme'
item_power: '&fPuissance élevée'
usage_hint:
- '&7Clic droit pour attaquer'
- '&7Durabilité: 100/100'Event Localization
Provide localized feedback for player interactions:
i18n:
de_de:
event:
on_attack: |
tell '&cKritischer Treffer!'
tell '&7Schaden: +15'
on_break: |
tell '&4Waffe ist zerbrochen!'
on_repair: |
tell '&aWaffe wurde repariert'Translation Priority
Content selection order:
- First Priority: i18n translation corresponding to the player's client language
- Second Priority: Default language content (root node configuration)
- Guarantee Mechanism: Ensures all players see understandable content
Troubleshooting
Common Issues
Q: What if translations aren't taking effect?
A: Check that language codes are formatted correctly, ensuring underscores are used instead of hyphens (e.g., zh_cn instead of zh-cn)
Q: Items don't change when players switch languages? A: This is normal behavior. Existing items will switch languages on their next update, while new items will immediately use the new language
Q: Can I translate only part of the content? A: Yes, untranslated parts will automatically use default content
Q: How do I confirm which language a player is using? A: The system detects this automatically, no manual intervention needed
Practical Case
Multilingual Legendary Equipment
dragon_slayer:
display: legendary_weapon
icon: diamond_sword
# English default
name:
weapon_name: '&4Dragon Slayer'
weapon_grade: '&6Legendary'
lore:
weapon_type: '&9Two-Handed Sword'
weapon_lore:
- '&fForged in dragon fire'
- '&fDeals extra damage to dragons'
weapon_stats:
- '&a+100 Attack Damage'
- '&a+25% Critical Strike'
event:
on_kill_dragon: |
tell '&6The dragon falls before your blade!'
give experience 1000
# Multilingual versions
i18n:
zh_cn:
name:
weapon_name: '&4屠龙者'
weapon_grade: '&6传说'
lore:
weapon_type: '&9双手剑'
weapon_lore:
- '&f在龙火中锻造而成'
- '&f对龙类造成额外伤害'
weapon_stats:
- '&a+100 攻击伤害'
- '&a+25% 暴击率'
event:
on_kill_dragon: |
tell '&6巨龙倒在了你的剑下!'
give experience 1000
ja_jp:
name:
weapon_name: '&4ドラゴンスレイヤー'
weapon_grade: '&6伝説'
lore:
weapon_type: '&9両手剣'
weapon_lore:
- '&fドラゴンの炎で鍛えられた'
- '&fドラゴンに追加ダメージ'
weapon_stats:
- '&a+100 攻撃力'
- '&a+25% クリティカル'
event:
on_kill_dragon: |
tell '&6ドラゴンがあなたの剣の前に倒れました!'
give experience 1000