Initial commit. UI localisation works.

This commit is contained in:
2023-08-18 12:22:23 +02:00
commit 9f17393310
100 changed files with 39402 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
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 }
}