From c41ab84738ddfc71d6062e0d173afa33ac2c35a6 Mon Sep 17 00:00:00 2001 From: frosty Date: Wed, 1 Apr 2026 00:37:15 +0300 Subject: feat: begin working on localisation --- src/Utility/Utility.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/Utility/Utility.c') diff --git a/src/Utility/Utility.c b/src/Utility/Utility.c index b4ad91d..0d7a28e 100644 --- a/src/Utility/Utility.c +++ b/src/Utility/Utility.c @@ -23,3 +23,12 @@ char *get_theme(const char *default_theme) { free(cookie); return strdup(default_theme); } + +char *get_locale(const char *default_locale) { + char *cookie = get_cookie("locale"); + if (cookie && beaker_get_locale_meta(cookie) != NULL) { + return cookie; + } + free(cookie); + return strdup(default_locale); +} -- cgit v1.2.3