[Xfce4-commits] <www:nick/gettext> Another try.
Nick Schermer
noreply at xfce.org
Sun Dec 5 15:08:01 CET 2010
Updating branch refs/heads/nick/gettext
to 838122cd9ace30ecd8da1d6da8849e3b44323822 (commit)
from be48696fc774fcb2a0915c5ef8f2d8b2e8401e8f (commit)
commit 838122cd9ace30ecd8da1d6da8849e3b44323822
Author: Nick Schermer <nick at xfce.org>
Date: Sun Dec 5 15:07:13 2010 +0100
Another try.
lib/core.php | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/core.php b/lib/core.php
index 12c3653..d2ed8ef 100644
--- a/lib/core.php
+++ b/lib/core.php
@@ -99,10 +99,12 @@ function lookup_key ($key, $valid_values, $default = null)
function lookup_user_language ($valid_values, $default = 'en')
{
- $accept = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
+ if (!isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
+ return $default;
+
+ $accept = strtolower ($_SERVER['HTTP_ACCEPT_LANGUAGE']);
if (empty ($accept))
return $default;
- $accept = strtolower ($accept);
foreach (explode (',', $accept) as $lang)
{
More information about the Xfce4-commits
mailing list