Struct lcid::LanguageId[][src]

pub struct LanguageId {
    pub name: &'static str,
    pub lcid: u32,
    pub english_name: &'static str,
    pub iso639_two_letter: &'static str,
    pub iso639_three_letter: &'static str,
    pub windows_three_letter: &'static str,
    pub ansi_code_page: Option<AnsiCodePage>,
}
Expand description

A language’s identifiers and information. Lookups from numeric or named identifiers return a reference to statically defined LanguageId.

Fields

name: &'static str

A unique name that identifies the language (IETF language tag).

lcid: u32

The language code ID for the language. This does not identify a language uniquely.

english_name: &'static str

A non-localized, English, readable name for the language.

iso639_two_letter: &'static str

A two-letter ISO-639 code for the language.

iso639_three_letter: &'static str

A three-letter ISO-639 code for the language.

windows_three_letter: &'static str

A three-letter code for the language used in the Windows API.

ansi_code_page: Option<AnsiCodePage>

The corresponding ANSI code page that may be used to encode this language, or None if the language can’t be encoded outside Unicode.

Implementations

The primary language ID part of the language’s LCID

The sub language ID part of the language’s LCID

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Try to identify a LanguageId from a name. This returns an error if the name is unknown or reserved.

The type returned in the event of a conversion error.

Try to identify a LanguageId from a numeric LCID. This returns an error if:

  • The LCID has any reserved bits set
  • The LCID has a sort ID
  • The LCID maps to an unknown, reserved, or neither defined nor reserved language

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.