yew_translator 1.0.1

A i18n implementation for yew using string templaters.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub type OverrideMessage = Box<dyn Fn(&String) -> String>;

/// Options for the string templater.
#[derive(Default)]
pub struct StringTemplaterOptions {
    /// If true, `StringTemplaterError`::UnknownField` will never be returned.
    pub safe_parse: bool,
    /// If true, display the missing keys in the data.
    pub display_missing_keys: bool,
    /// Override the message for the missing data field.
    pub override_missing_keys: Option<OverrideMessage>,
    /// If true, display the missing keys in the translation.
    pub display_missing_translations: bool,
    /// Override the message for the missing translations field.
    pub override_missing_translations: Option<OverrideMessage>,
}