Trait i18n_embed::Localizer[][src]

pub trait Localizer {
    fn language_loader(&self) -> &dyn LanguageLoader;
fn i18n_assets(&self) -> &dyn I18nAssets; fn available_languages(
        &self
    ) -> Result<Vec<LanguageIdentifier>, I18nEmbedError> { ... }
fn select(
        &self,
        requested_languages: &[LanguageIdentifier]
    ) -> Result<Vec<LanguageIdentifier>, I18nEmbedError> { ... } }
Expand description

This trait provides dynamic access to an LanguageLoader and an I18nAssets, which are used together to localize a library/crate on demand.

Required methods

The LanguageLoader used by this localizer.

The source of localization assets used by this localizer

Provided methods

The available languages that can be selected by this localizer.

Automatically the language currently requested by the system by the the LanguageRequester), and load it using the provided LanguageLoader.

Implementors