use leptos::*; use crate::locales::catalogues::get_dictionary; mod catalogues; pub fn trl(cx: Scope, phrase: &'static str) -> impl Fn() -> &'static str { let mut translated = phrase; if let Some(dict) = get_dictionary(cx) { if let Some(p) = dict.get(phrase) { translated = *p; } } || { translated } }