feat: begin working on localisation

This commit is contained in:
frosty
2026-04-01 00:37:15 +03:00
parent 335b6f4683
commit c41ab84738
16 changed files with 275 additions and 63 deletions
+9
View File
@@ -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);
}
+3
View File
@@ -1,7 +1,10 @@
#ifndef UTILITY_H
#define UTILITY_H
#include <beaker.h>
int hex_to_int(char c);
char *get_theme(const char *default_theme);
char *get_locale(const char *default_locale);
#endif