use l10n::unic_langid::langid; use l10n::L10nMessage; l10n::init!(); fn main() { let welcome = l10n::message!( "home", "welcome", "first-name" = "Alan", "last-name" = "Turing" ); assert_eq!( welcome.translate(&langid!("en")), "Welcome \u{2068}Alan\u{2069} on Chat App!" ); assert_eq!( welcome.translate(&langid!("fr")), "Bienvenue \u{2068}Alan\u{2069} \u{2068}Turing\u{2069} sur chat app." ); }