diff options
author | Tobias Diekershoff <tobias.diekershoff@gmx.net> | 2011-03-16 06:52:33 +0100 |
---|---|---|
committer | Tobias Diekershoff <tobias.diekershoff@gmx.net> | 2011-03-16 06:52:33 +0100 |
commit | c43f647049c78b594c90e95d06d12f29f300d5d3 (patch) | |
tree | a6b02ad763a5d539158721edbe8ca73e158d8ca4 /index.php | |
parent | a2ee5ebe427522228dc03dc81da11f348a399c4d (diff) | |
parent | e2ea341094c53e78ae7473a83d2b6c85b1cde4eb (diff) | |
download | volse-hubzilla-c43f647049c78b594c90e95d06d12f29f300d5d3.tar.gz volse-hubzilla-c43f647049c78b594c90e95d06d12f29f300d5d3.tar.bz2 volse-hubzilla-c43f647049c78b594c90e95d06d12f29f300d5d3.zip |
Merge branch 'master' of git://github.com/friendika/friendika
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -31,10 +31,17 @@ $install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? false * * 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. * */ -$lang = ((isset($a->config['system']['language'])) ? $a->config['system']['language'] : 'en'); +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'); +} load_translation_table($lang); |