aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-05-23 17:18:36 -0700
committerFriendika <info@friendika.com>2011-05-23 17:18:36 -0700
commit3e6180183bdc01edfa01dc4b966daa4081c29604 (patch)
tree57cc791da7766c07f6c3dcb323ba8539cef9cd23 /index.php
parent3ea145fae7defaf959b04797afc8482bd0190352 (diff)
downloadvolse-hubzilla-3e6180183bdc01edfa01dc4b966daa4081c29604.tar.gz
volse-hubzilla-3e6180183bdc01edfa01dc4b966daa4081c29604.tar.bz2
volse-hubzilla-3e6180183bdc01edfa01dc4b966daa4081c29604.zip
improved browser language detect, set user language on login
Diffstat (limited to 'index.php')
-rw-r--r--index.php16
1 files changed, 1 insertions, 15 deletions
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);