Trait rust_i18n_support::Backend

source ·
pub trait Backend:
    Send
    + Sync
    + 'static {
    // Required methods
    fn available_locales(&self) -> Vec<&str>;
    fn translate(&self, locale: &str, key: &str) -> Option<&str>;
}
Expand description

I18n backend trait

Required Methods§

source

fn available_locales(&self) -> Vec<&str>

Return the available locales

source

fn translate(&self, locale: &str, key: &str) -> Option<&str>

Get the translation for the given locale and key

Implementors§