diff options
Diffstat (limited to 'lib/private/L10N/Factory.php')
-rw-r--r-- | lib/private/L10N/Factory.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php index 74cea7aa843..4f63adce572 100644 --- a/lib/private/L10N/Factory.php +++ b/lib/private/L10N/Factory.php @@ -126,14 +126,13 @@ class Factory implements IFactory { * @return string language If nothing works it returns 'en' */ public function findLanguage($app = null) { - if ($this->requestLanguage !== '' && $this->languageExists($app, $this->requestLanguage)) { - return $this->requestLanguage; - } - $forceLang = $this->config->getSystemValue('force_language', false); - if (is_string($forceLang) && $this->languageExists($app, $forceLang)) { + if (is_string($forceLang)) { $this->requestLanguage = $forceLang; - return $forceLang; + } + + if ($this->requestLanguage !== '' && $this->languageExists($app, $this->requestLanguage)) { + return $this->requestLanguage; } /** |