Skip to main content

framework_locales

Function framework_locales 

Source
pub fn framework_locales() -> &'static [(&'static str, &'static [&'static str])]
Expand description

The framework bundle: teksilo-widgets’ own translatable strings, grouped by locale. Registered by applications via I18nConfig::framework_locales(teksilo_widgets::framework_locales()) at startup.

teksilo-widgets ships en-US (the source language) plus 22 translations. Keys missing from a locale’s bundle fall back to the en-US source via I18nManager::resolve_widget’s fallback chain, so a partial translation degrades key-by-key rather than wholesale. Applications that need a locale teksilo-widgets doesn’t ship — or that disagree with a shipped rendering — can fill the gap with I18nConfig::override_widget_strings(...), which wins over this bundle.

ar-SA and he-IL are right-to-left; the layout flip is derived from the language tag by teksilo_i18n::rtl_from_locale, not from anything in the .ftl files themselves.

Every translation carries exactly the same message keys and the same { $variable } placeables as en-US.ftl; locale_parity in crates/teksilo-widgets/tests/locale_parity.rs enforces that.