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
The languages being requested by the operating system/environment according to the locale_config crate’s implementation.
Trait Implementations
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
fn set_language_override(
&mut self,
language_override: Option<LanguageIdentifier>
) -> Result<(), I18nEmbedError>
[src]
fn set_language_override(
&mut self,
language_override: Option<LanguageIdentifier>
) -> Result<(), I18nEmbedError>
[src]Poll the system’s currently selected language, and call Localizer#select() on each of the listeners. Read more
The languages currently loaded, keyed by the LanguageLoader::domain(). Read more
Auto Trait Implementations
impl<'a> !RefUnwindSafe for DesktopLanguageRequester<'a>
impl<'a> !Send for DesktopLanguageRequester<'a>
impl<'a> !Sync for DesktopLanguageRequester<'a>
impl<'a> Unpin for DesktopLanguageRequester<'a>
impl<'a> !UnwindSafe for DesktopLanguageRequester<'a>