Trait zng_ext_l10n::L10nSource
source · pub trait L10nSource: Send + 'static {
// Required methods
fn available_langs(
&mut self,
) -> BoxedVar<Arc<LangMap<HashMap<LangFilePath, PathBuf>>>>;
fn available_langs_status(&mut self) -> BoxedVar<LangResourceStatus>;
fn lang_resource(
&mut self,
lang: Lang,
file: LangFilePath,
) -> BoxedVar<Option<ArcEq<FluentResource>>>;
fn lang_resource_status(
&mut self,
lang: Lang,
file: LangFilePath,
) -> BoxedVar<LangResourceStatus>;
}
Expand description
Represents a localization data source.
See L10N.load
for more details.
Required Methods§
sourcefn available_langs(
&mut self,
) -> BoxedVar<Arc<LangMap<HashMap<LangFilePath, PathBuf>>>>
fn available_langs( &mut self, ) -> BoxedVar<Arc<LangMap<HashMap<LangFilePath, PathBuf>>>>
Gets a read-only variable with all lang files that the source can provide.
sourcefn available_langs_status(&mut self) -> BoxedVar<LangResourceStatus>
fn available_langs_status(&mut self) -> BoxedVar<LangResourceStatus>
Gets a read-only variable that is the status of the available_langs
value.
sourcefn lang_resource(
&mut self,
lang: Lang,
file: LangFilePath,
) -> BoxedVar<Option<ArcEq<FluentResource>>>
fn lang_resource( &mut self, lang: Lang, file: LangFilePath, ) -> BoxedVar<Option<ArcEq<FluentResource>>>
Gets a read-only variable that provides the fluent resource for the lang
and file
if available.
sourcefn lang_resource_status(
&mut self,
lang: Lang,
file: LangFilePath,
) -> BoxedVar<LangResourceStatus>
fn lang_resource_status( &mut self, lang: Lang, file: LangFilePath, ) -> BoxedVar<LangResourceStatus>
Gets a read-only variable that is the status of the lang_resource
value.