Fix locale selection on Alpine Linux

This commit is contained in:
Miraty 2023-05-04 00:40:50 +02:00
parent c05c16a516
commit 70024c0565
1 changed files with 1 additions and 0 deletions

View File

@ -15,6 +15,7 @@ foreach (explode(',', preg_replace('/[A-Z0-9]|q=|;|-|\./', '', $_SERVER['HTTP_AC
break;
}
define('LOCALE', $locale ?? 'en');
putenv('LANG=C.UTF-8');
setlocale(LC_MESSAGES, 'C.UTF-8');
bindtextdomain('messages', ROOT_PATH . '/locales/' . LOCALE);
header('Content-Language: ' . LOCALE);