aboutsummaryrefslogtreecommitdiff
path: root/src/Routes/Home.c
diff options
context:
space:
mode:
authorfrosty <gabriel@bwaaa.monster>2026-04-01 00:37:15 +0300
committerfrosty <gabriel@bwaaa.monster>2026-04-01 00:37:15 +0300
commitc41ab84738ddfc71d6062e0d173afa33ac2c35a6 (patch)
treefa3f377277a99877fda4415f30cbff56468031db /src/Routes/Home.c
parent335b6f46837f3496467da50de2d9bce0c5ef6a1a (diff)
downloadomnisearch-c41ab84738ddfc71d6062e0d173afa33ac2c35a6.tar.gz
feat: begin working on localisation
Diffstat (limited to 'src/Routes/Home.c')
-rw-r--r--src/Routes/Home.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Routes/Home.c b/src/Routes/Home.c
index c857663..48edfd9 100644
--- a/src/Routes/Home.c
+++ b/src/Routes/Home.c
@@ -1,19 +1,23 @@
#include "Home.h"
#include "../Utility/Utility.h"
+#include <beaker.h>
#include <stdlib.h>
int home_handler(UrlParams *params) {
(void)params;
char *theme = get_theme("");
+ char *locale = get_locale("en_uk");
TemplateContext ctx = new_context();
context_set(&ctx, "theme", theme);
+ beaker_set_locale(&ctx, locale);
char *rendered_html = render_template("home.html", &ctx);
send_response(rendered_html);
free(rendered_html);
free_context(&ctx);
free(theme);
+ free(locale);
return 0;
}