Always set the request language to the force language
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
0dc1b3e741
commit
4b8a9a37d6
|
@ -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->requestLanguage = $forceLang;
|
||||
}
|
||||
|
||||
$forceLang = $this->config->getSystemValue('force_language', false);
|
||||
if (is_string($forceLang) && $this->languageExists($app, $forceLang)) {
|
||||
$this->requestLanguage = $forceLang;
|
||||
return $forceLang;
|
||||
if ($this->requestLanguage !== '' && $this->languageExists($app, $this->requestLanguage)) {
|
||||
return $this->requestLanguage;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue