pub struct Locales {
    pub default: String,
    pub other: Vec<String>,
    pub using_i18n: bool,
}
Expand description

Defines app information about i18n, specifically about which locales are supported.

Fields

default: String

The default locale, which will be used as a fallback if the user’s locale can’t be extracted. This will be built for at build-time.

other: Vec<String>

All other supported locales, which will all be built at build time.

using_i18n: bool

Whether or not the user is actually using i18n. This is set here because most things that need locale data also need it.

Implementations

Gets all the supported locales by combining the default, and other.

Checks if the given locale is supported.

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

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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)

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.