Localization Guide
Datapacks are built for multi-language support from day one. JSON data files never contain raw display text β they store translation keys. The actual words live in language files under assets/languages/.
How It Works
Item JSON:
"displayName": "items.materials.mypack.ores.iron"
β
Game looks up the key in the active language file:
en_US.json β "Iron Ore"
fr_FR.json β "Minerai de Fer"
β
Player sees text in their selected language
Language File Format
Language files are structured as sections (top-level keys) containing flat key-value maps:
{
"items": {
"items.materials.mypack.ores.iron": "Iron Ore",
"items.materials.mypack.ores.iron.desc": "A common ore used in basic forging."
},
"skills": {
"skills.category.mypack.crafting.forging": "Forging",
"skills.category.mypack.crafting.forging.desc": "The art of smelting raw ore into metal ingots."
}
}
Minimum Requirement
You must provide at least en_US.json. If a player's language file is missing a key, the game falls back to en_US.json. If the key is also missing there, the raw key string is displayed β a useful debugging signal.
Supported Locale Codes
| Code | Language |
|---|---|
en_US | English (United States) β default |
fr_FR | French |
de_DE | German |
es_ES | Spanish |
pt_BR | Portuguese (Brazil) |
uk_UA | Ukrainian |
zh_CN | Chinese (Simplified) |
ja_JP | Japanese |
Adding a Second Language
- Create
assets/languages/fr_FR.json - Copy all keys from
en_US.json - Translate the values β keep all keys identical
Key Harvesting
The Data Helper auto-collects all displayName and description keys from all editors and merges them into the language table. Keys present in the data but missing from a translation file are flagged with a pending badge in the editor UI.
Tips
- Never translate keys β only translate values
- Use section headers to keep language files organized
- Keep descriptions to one or two sentences
- Always test by switching the game language before releasing