-
-
Notifications
You must be signed in to change notification settings - Fork 14
Localization
To make the map display user-friendly names, you need to provide display-names. The best way to do this is through the use of lang files.
In minecraft, lang files are part of resourcepacks, located in assets/lang/. The datapack map supports opening resource packs separately to load those lang files. However, if you prefer you can also include an assets/lang/ folder with your datapack. (If you make a mod, you are probably doing this anyways.)
The most important language is en_us since other languages fall back to this language if no translation is provided.
You should use the following translation keys.
- For custom biomes, use
biome.<namespace>.<path>. This matches the vanilla scheme. - For custom structures, use
structure.<namespace>.<path>. - For custom dimensions, use
dimension.<namespace>.<path>. - For custom world presets, use
generator.<namespace>.<path>. This matches the vanilla scheme.
In all these cases <path> has / replaced with .
assets/lang/en_us.json
{
"biome.test.example_plains": "Example Plains",
"structure.test.example_village": "Example Village",
"dimension.test.example_dimension": "Example Dimension",
"generator.test.very_flat": "Very Flat",
//...
}If you don't want to use lang files, you can also specify the name inside the biome_colors.json and structure_icons.json files. See Biome and Structure Metadata. However, the use of language files is recommended.