Crate lcid[−][src]
Expand description
This crate provides language information and lookups from Microsoft’s numeric
language code identifiers (LCIDs) or language names (IETF language tags,
BCP 47
), similar to - but more limited than - the
System.Globalization.CultureInfo
class in .NET. The lookup follows the
MS-LCID
“Windows Language Code Identifier Reference” specification.
Sort IDs are not supported yet.
Examples
use lcid::LanguageId; use std::convert::TryInto; let lang: &LanguageId = 1033.try_into().unwrap(); assert_eq!(lang.name, "en-US"); let lang: &LanguageId = "en-US".try_into().unwrap(); assert_eq!(lang.lcid, 1033);
Modules
constants | Contains all defined |
Structs
LanguageId | A language’s identifiers and information. Lookups from numeric or named
identifiers return a reference to statically defined |
Enums
AnsiCodePage | A known ANSI code page. Some languages can be encoded using one of these
code pages. This enum has a |
LcidLookupError | Errors when looking up a |
NameLookupError | Errors when looking up a |