diff options
author | Zach Copley <zach@status.net> | 2010-03-03 12:11:20 -0800 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-03-03 12:11:20 -0800 |
commit | 09169d6f3ce60770d0ae115bde38a9274e794640 (patch) | |
tree | 5c680b74ceacacb9dc2c6e3183f150fa45468052 /lib/util.php | |
parent | 82ea0f7884d291f11964d5a54dbf8194ce24cb58 (diff) | |
parent | 0881eba80eabfea65919be2f3d65235ccd0b5eb6 (diff) |
Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
* 'testing' of gitorious.org:statusnet/mainline:
Language setting fixes:
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/util.php b/lib/util.php index 46be920fa..da2799d4f 100644 --- a/lib/util.php +++ b/lib/util.php @@ -105,11 +105,13 @@ function common_language() // Otherwise, find the best match for the languages requested by the // user's browser... - $httplang = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : null; - if (!empty($httplang)) { - $language = client_prefered_language($httplang); - if ($language) - return $language; + if (common_config('site', 'langdetect')) { + $httplang = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : null; + if (!empty($httplang)) { + $language = client_prefered_language($httplang); + if ($language) + return $language; + } } // Finally, if none of the above worked, use the site's default... |