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
+5
View File
@@ -5,6 +5,7 @@
#include "../Utility/Unescape.h"
#include "../Utility/Utility.h"
#include "Config.h"
#include <beaker.h>
static char *build_images_request_cache_key(const char *query, int page,
const char *client_key) {
@@ -46,6 +47,10 @@ int images_handler(UrlParams *params) {
context_set(&ctx, "theme", theme);
free(theme);
char *locale = get_locale("en_uk");
beaker_set_locale(&ctx, locale);
free(locale);
context_set(&ctx, "page", page_str);
context_set(&ctx, "prev_page", prev_str);
context_set(&ctx, "next_page", next_str);