fn load_language(
        &self,
        language_id: &unic_langid::LanguageIdentifier,
        i18n_embed: &dyn I18nEmbedDyn,
    ) -> Result<(), I18nEmbedError> {
        if language_id == &self.src_locale() {
            self.load_src_locale();
            return Ok(());
        }
        let language_id_string = language_id.to_string();

        let file_path = format!("{}/{}", language_id_string, self.language_file_name());

        let f = i18n_embed
            .get_dyn(file_path.as_ref())
            .ok_or(I18nEmbedError::LanguageNotAvailable(language_id_string))?;
        info!(
            "Loading language \"{0}\" from file \"{1}\"",
            language_id.to_string(),
            file_path
        );
        self.load_language_file(language_id.clone(), f);

        Ok(())
    }
/// Load the language corresponding the specified `language_id`.
Load the language corresponding the specified `language_id`.
Load the language corresponding the specified ` language_id ` .
fn load_language(
        &self,
        language_id: &unic_langid::LanguageIdentifier,
        i18n_embed: &dyn I18nEmbedDyn,
    ) -> Result<(), I18nEmbedError> {
        if language_id == &self.src_locale() {
            self.load_src_locale();
            return Ok(());
        }
        let language_id_string = language_id.to_string();
        let file_path = format!("{}/{}", language_id_string, self.language_file_name());
        let f = i18n_embed
            .get_dyn(file_path.as_ref())
            .ok_or(I18nEmbedError::LanguageNotAvailable(language_id_string))?;
        info!(
            "Loading language \"{0}\" from file \"{1}\"",
            language_id.to_string(),
            file_path
        );
        self.load_language_file(language_id.clone(), f);
        Ok(())
    }
fn load_language ( & self , language_id : & unic_langid :: LanguageIdentifier , i18n_embed : & dyn I18nEmbedDyn , ) -> Result < ( ) , I18nEmbedError > { if language_id == & self . src_locale ( ) { self . load_src_locale ( ) ; return Ok ( ( ) ) ; } let language_id_string = language_id . to_string ( ) ; let file_path = format ! ( " " language_id_string self language_file_name ( ) ) ; let f = i18n_embed . get_dyn ( file_path . as_ref ( ) ) . ok_or ( I18nEmbedError :: LanguageNotAvailable ( language_id_string ) ) ? ; info ! ( " \" \" \" \" " language_id to_string ( ) file_path ) ; self . load_language_file ( language_id . clone ( ) , f ) ; Ok ( ( ) ) }
Load the language corresponding the specified `language_id`.
Load the language corresponding the specified ` language_id ` .
&self
language_id
&unic_langid::LanguageIdentifier
i18n_embed
&dyn I18nEmbedDyn
&self
language_id
&unic_langid::LanguageIdentifier
i18n_embed
&dyn I18nEmbedDyn