From 55434f87ff252c784e5e00b4775b9555da31ebb0 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 13 May 2025 12:50:04 +0200 Subject: translation endpoint --- ui/src/locale.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ui/src') diff --git a/ui/src/locale.rs b/ui/src/locale.rs index 0179c66..442bd9d 100644 --- a/ui/src/locale.rs +++ b/ui/src/locale.rs @@ -19,6 +19,7 @@ static LANG_TABLES: LazyLock Cow<'static, str> { } } +pub fn get_translation_table(lang: &Language) -> &'static HashMap<&'static str, &'static str> { + LANG_TABLES.get(lang).unwrap() +} + pub struct TrString<'a>(Cow<'a, str>); impl Render for TrString<'_> { fn render(&self, writer: &mut impl std::fmt::Write) -> std::fmt::Result { -- cgit v1.2.3-70-g09d2