Skip to main content

set_lang

Function set_lang 

Source
pub fn set_lang(lang: LanguageIdentifier)
Expand description

Updates the runtime language for the application.

This operation is atomic. Subsequent calls to t! will immediately reflect the new language. The fallback chain (see LocaleState) is resolved here, once, rather than on every lookup.

§Arguments

  • lang - The new LanguageIdentifier to set (e.g., parsed from “fr-FR”).