ð Language
Overviewâ
Here, "language" specifically refers to the client-side language setting. This means any text content dynamically adapts to the player's current client language in real time.
In CraftEngine, you only need to configure your language-dependent content in the following format:
lang:
en_us:
item.custom.palm_leaves: Palm Leaves
item.custom.palm_log: Palm Log
In the absence of language files, Minecraft will default to using en_us
. Therefore, it is highly recommended to configure en_us if you are creating a new translation key.
If you wish to overwrite all the languages, use "all" as the language.
lang:
all:
container.inventory: ""
To render client side translation, please insert https://docs.advntr.dev/minimessage/format.html#translatable
Example:
items:
custom:translate:
material: paper
data:
item-name: "<lang:item.custom.palm_log>"
Translate Blocksâ
In addition to custom translation keys, CraftEngine provides built-in shortcut translations for block names, ensuring compatibility with:
- CraftEngine Mod (client-side)
- Server-side block translation plugins
The configuration method is very simple. Just add the block_name:
prefix before the regular block ID, and the plugin will automatically convert it to the corresponding real block ID.
Example: block_name:default:chinese_lantern
-> block.craftengine.note_block_13
lang:
en_us:
block_name:default:chinese_lantern: Chinese Lantern
block_name:default:netherite_anvil: Netherite Anvil
block_name:default:topaz_ore: Topaz Ore
zh_cn:
block_name:default:chinese_lantern: įŊįŽž
block_name:default:netherite_anvil: äļįåéį §
block_name:default:topaz_ore: éŧįįŋįģ