aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/index.php b/index.php
index 617dc0e..dafc999 100644
--- a/index.php
+++ b/index.php
@@ -11,4 +11,13 @@ function require_all_glob(string $pattern) {
require_all_glob('routes/*.php');
require_all_glob('misc/*.php');
+$lang = get_ui_language();
+header('Content-Language: ' . str_replace('_', '-', $lang));
+putenv("LANG=$lang");
+setlocale(LC_MESSAGES, $lang);
+
+bindtextdomain('digitigrade', __DIR__ . '/locale');
+bind_textdomain_codeset('digitigrade', 'UTF-8');
+textdomain('digitigrade');
+
Digitigrade\Router::getInstance()->processRequest();