X-Git-Url: https://git-public.kairo.at/?p=authserver.git;a=blobdiff_plain;f=app%2Fauthsystem.inc.php;fp=app%2Fauthsystem.inc.php;h=372c4db9c19b9c51afd220828a3ff9df4e5175dc;hp=6e30200293422d7fa3dd9fd5c26d6c7669649b1c;hb=8b69f29ccce4f236a8954a80c837bcd20987ca53;hpb=7d51fe69654d1997f4f48eb7b928c5352da8eb63 diff --git a/app/authsystem.inc.php b/app/authsystem.inc.php index 6e30200..372c4db 100644 --- a/app/authsystem.inc.php +++ b/app/authsystem.inc.php @@ -26,14 +26,18 @@ require_once('../kairo-utils/email.php-class'); // Class for sending emails require_once(__DIR__.'/authutils.php-class'); -bindtextdomain('kairo_auth', 'en'); // XXX: Should negotiate locale. -bind_textdomain_codeset('kairo_auth', 'utf-8'); - // Connect to our MySQL DB $db = new PDO($dbdata['dsn'], $dbdata['username'], $dbdata['password']); // Instantiate auth utils. $utils = new AuthUtils($settings, $db); +$textdomain = 'kairo_auth'; +$textlocale = $utils->negotiateLocale(array('en', 'de')); +putenv('LC_ALL='.$textlocale); +bindtextdomain($textdomain, '../locale'); +bind_textdomain_codeset($textdomain, 'utf-8'); +textdomain($textdomain); + /* Creating the DB tables: CREATE TABLE `auth_sessions` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT ,