pub trait I18nStringTranslateExt {
// Required method
fn to_no_translate_string(&self) -> String;
}Expand description
Extension trait for I18nString to translate it into a no-translate string.
Required Methods§
Sourcefn to_no_translate_string(&self) -> String
fn to_no_translate_string(&self) -> String
Translate the I18nString into a no-translate string.
§Examples
Basic example.
use i18n_string::{I18nString, I18nStringTranslateExt};
let s = I18nString::template("hello {0}", [I18nString::literal("world")]);
assert_eq!(s.to_no_translate_string(), "hello world");