The hypersig_i18n crate
Each text holds its translations in one value, so a text without one of them fails to compile. The language is part of each page's route, and / redirects to the page in the language the browser asks for.
A text is a struct with one field per language, so a text without its Japanese, or a language added without its texts, is a compile error.
A locale is the first segment of a page's route, so the link to the page in another language is checked like any other link.
The texts are plain struct literals and the languages a plain enum, so the compiler's own checks find what is missing.
A text without its Japanese is a compile error at that line. Overview shows how the languages are declared.
// error[E0063]: missing field `ja` in initializer of `ByLang<_>`
let title = ByLang { en: "Settings" };This site is translated with it: every page is rendered once per language from the same Rust function.