Each supported language is defined by one TOML file in locales/. The build
script discovers these files and generates the Rust locale registry, language
selectors, locale matching, native menu command mapping, and optional Windows
font metadata.
To add a language:
- Copy
locales/en.tomlto a file named for the new locale, such aslocales/it.toml. - Set
code,native_name,locale_patterns, and the next unusedorder. - Translate every value in
[strings]and[translations]. - If the script needs a Windows font fallback, set both
windows_font_nameandwindows_font_file. - Run
cargo build.
No Rust source changes are required. The build fails with a focused error when
locale codes or orders are duplicated, keys are missing or unknown, values are
empty, font metadata is incomplete, or placeholders such as {name} and
{version} differ from English.
en.toml is the canonical catalogue. When UI text is added or removed, update
the English file and make the same key change in every other locale file.