From 3e6180183bdc01edfa01dc4b966daa4081c29604 Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 23 May 2011 17:18:36 -0700 Subject: improved browser language detect, set user language on login --- index.php | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 05eef6c6e..eb75585c4 100644 --- a/index.php +++ b/index.php @@ -29,22 +29,8 @@ $install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? false @include(".htconfig.php"); -/** - * - * Get the language setting directly from system variables, bypassing get_config() - * as database may not yet be configured. - * - * If possible, we use the value from the browser. - * - */ - -if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { - $langs = preg_split("/[,-]/",$_SERVER['HTTP_ACCEPT_LANGUAGE'],2); - $lang = $langs[0]; -} else { - $lang = ((isset($a->config['system']['language'])) ? $a->config['system']['language'] : 'en'); -} +$lang = get_language(); load_translation_table($lang); -- cgit v1.2.3