pub enum Locale {
En,
ZhCn,
}Expand description
Supported display language / 支持的显示语言。
Variants§
Implementations§
Source§impl Locale
impl Locale
Sourcepub fn from_tag(tag: &str) -> Self
pub fn from_tag(tag: &str) -> Self
Normalize OS locale forms such as zh_CN.UTF-8 or zh-Hans-CN.
规范化系统区域标识,例如 zh_CN.UTF-8 或 zh-Hans-CN。
Sourcepub fn system() -> Self
pub fn system() -> Self
RAZERS_LANG > LC_ALL > LC_MESSAGES > LANG > native OS locale > English.
优先级依次为 RAZERS_LANG、LC_ALL、LC_MESSAGES、LANG、原生系统语言、英文。
Trait Implementations§
impl Copy for Locale
impl Eq for Locale
impl StructuralPartialEq for Locale
Auto Trait Implementations§
impl Freeze for Locale
impl RefUnwindSafe for Locale
impl Send for Locale
impl Sync for Locale
impl Unpin for Locale
impl UnsafeUnpin for Locale
impl UnwindSafe for Locale
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more