macro_rules! set_locale {
($locale:expr) => { ... };
}
Expand description
Sets the current locale.
If the input language tag is invalid or not translated,
the translation will be disabled.
ⓘr18::set_locale!("zh-CN"); assert_eq!(Some("zh-CN"), r18::locale!());
r18::set_locale!("");
assert_eq!(None, r18::locale!());