diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-04-03 15:36:24 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-04-03 15:36:24 +0200 |
commit | 712e478cb2b430354ef173a48158472d0a004dd3 (patch) | |
tree | e0abff28caa66ae785e35b3c7dcd96e5ee8f9b26 /lib/private/l10n.php | |
parent | a2087f30d1c4b379b9a53a7ba8ef604038d2b8cb (diff) | |
download | nextcloud-server-712e478cb2b430354ef173a48158472d0a004dd3.tar.gz nextcloud-server-712e478cb2b430354ef173a48158472d0a004dd3.zip |
fix caching of preferred language
Diffstat (limited to 'lib/private/l10n.php')
-rw-r--r-- | lib/private/l10n.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/l10n.php b/lib/private/l10n.php index 95b80bebdb2..59f26423afa 100644 --- a/lib/private/l10n.php +++ b/lib/private/l10n.php @@ -125,7 +125,7 @@ class OC_L10N implements \OCP\IL10N { $preferred_language = str_replace('-', '_', $preferred_language); foreach ($available as $available_language) { if ($preferred_language === strtolower($available_language)) { - if (is_null($app)) { + if (!is_array($app)) { self::$language = $available_language; } return $available_language; @@ -133,7 +133,7 @@ class OC_L10N implements \OCP\IL10N { } foreach ($available as $available_language) { if (substr($preferred_language, 0, 2) === $available_language) { - if (is_null($app)) { + if (!is_array($app)) { self::$language = $available_language; } return $available_language; @@ -142,6 +142,7 @@ class OC_L10N implements \OCP\IL10N { } } + self::$language = 'en'; // Last try: English return 'en'; } |