Expand description
Locale — per-tenant locale registry.
Drives the language picker on every page edit form and the
locale FK on cms_translation.
Exactly one row carries is_default = true; the admin form
enforces that invariant when toggling.
Structs§
- Locale
- One row per active locale on the tenant.
codefollows BCP-47 (e.g.en,fr-CA,pt-BR).
Functions§
- validate_
code - Validate + normalize a BCP-47-ish locale
codefor thecms_localeregistry. Content locales may be any well-formed tag — core provides metadata + graceful fallback viarustango::i18n::locale_info— but the tag must be structurally sane so it matchesAccept-Language, keys translations predictably, and fits the 16-char column. Normalizes_→-, language→lowercase, script→Titlecase, region→UPPERCASE. Returns the normalized code, or a human-readable error message.