v0.14.0
Data file values can now carry per-language variants. A value like { en: "Cloud infrastructure", de: "Cloud-Infrastruktur" } resolves to the current page language, so the bundled Trust Center is bilingual out of the box. Plain single-language data is unchanged.
Per-language data values (i18n for data-driven templates)
Data files (data/**) can now provide language maps — values whose keys are your configured language codes — and they resolve to the language of the page being rendered. This makes data-driven templates like the bundled Trust Center bilingual without duplicating data files.
Language maps
Any data value may be a map keyed by language code:
# data/trust/faq.yaml - question: en: Where is data stored? de: Wo werden Daten gespeichert? answer: en: Data is stored in the EU. de: Daten werden in der EU gespeichert.
When the page renders for de, the value resolves to the German variant; for en, the English one. Resolution falls back to the default language, then to the first present entry, so a partially translated value still renders something sensible.
A map is only treated as a language map when all of its keys are configured language codes. A map like { icon: "shield", label: "Security" } is left untouched, and plain strings, numbers, and booleans pass through byte-for-byte — existing single-language sites produce identical output.
The i18n filter
Resolution is exposed as a Tera filter (alias localize) for use in any template:
{{ value | i18n(lang=lang) }}
The bundled trust-index.html and trust-item.html templates already apply it to all prose fields — certification name/description/scope/auditor, subprocessor name/purpose/location, and FAQ question/answer — so the Trust Center is bilingual out of the box.
Missing-translation warnings
When a value is present in some but not all configured languages, the build prints a warning that points at the path and the missing language(s), so gaps in translation are easy to spot:
⚠ Warning: data.trust.faq[0].answer: language map missing translation(s) for de