Struct i18n_embed::DesktopLanguageRequester[][src]

pub struct DesktopLanguageRequester<'a> { /* fields omitted */ }
Expand description

A LanguageRequester for the desktop platform, supporting windows, linux and mac. It uses locale_config to select the language based on the system selected language.

⚠️ This API requires the following crate features to be activated: desktop-requester.

Implementations

Create a new DesktopLanguageRequester.

The languages being requested by the operating system/environment according to the locale_config crate’s implementation.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

The currently requested languages.

Add a listener to this LanguageRequester. When the system reports that the currently requested languages has changed, each listener will have its Localizer#select() method called. Weak is used so that when the Arc that it references is dropped, the listener will also be removed next time this requester is polled/updates. Read more

Add a listener to this LanguageRequester. When the system reports that the currently requested languages has changed, each listener will have its Localizer#select() method called. As opposed to LanguageRequester::add_listener(), this listener will not be removed. Read more

Override the languages fed to the Localizer listeners during a #poll(). Set this as None to disable the override. Read more

Poll the system’s currently selected language, and call Localizer#select() on each of the listeners. Read more

The languages reported to be available in the listener Localizers. Read more

The languages currently loaded, keyed by the LanguageLoader::domain(). 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

Performs the conversion.

Performs the conversion.

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.