Folder Location
Place your language files inside thecustomadvancements/ folder in your game directory, under data/lang/:
.json extension. The mod scans the whole lang/ folder on every load and on every /ca reload.
Four example language files —
en_us.json, de_de.json, es_es.json, and fr_fr.json — are copied into this folder automatically on first launch. Open them to see the expected format before creating your own.Referencing Keys in Advancement JSON
Instead of a literal string in thetitle or description field of your advancement’s display object, use Minecraft’s translate text component and point it at a key:
customadvancements/customadvancements/root.json
translate component against the loaded language data for the player’s active locale. If no matching key is found, the raw translation key appears in place of the localized text — which makes a missing entry easy to spot in-game.
Lang File Format
Language files use the standard Minecraft JSON format: a single flat object mapping each string key to its translated value. No nested objects or arrays are used.customadvancements/data/lang/en_us.json
Key Naming Convention
Thetranslate values are arbitrary strings — you define both the key and its value. The convention used throughout the bundled examples is:
<advancement_name> matches the filename of your advancement definition without the .json extension. An advancement defined in back_to_the_roots.json therefore uses customadvancements.advancements.back_to_the_roots.title.
Supporting Multiple Languages
To support additional languages, add one file per locale:1
Create your primary language file
Start with
en_us.json as your default. Every translation key used anywhere in your advancements should have an entry here, so players always see readable text even when no other locale file matches their language setting.2
Add additional locale files
For each additional language, create a file named with the appropriate locale code, such as
de_de.json, fr_fr.json, or zh_cn.json. The keys are identical; only the values change.customadvancements/data/lang/de_de.json
3
Reload to apply
Save your files and run
/ca reload, or restart the game. The mod re-scans the entire lang/ folder and loads every .json file it finds.Locale Code Reference
Minecraft’s locale codes follow the lowercaselanguage_region pattern. A few common examples:
Minecraft automatically selects the file matching the player’s current language setting. If no matching file exists, the raw translation key is displayed instead.