summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2018-05-09 12:05:46 +0200
committerGeorg Ehrke <developer@georgehrke.com>2018-05-22 19:30:25 +0200
commit2a21471c74dc5a5e5e9859000316b385007d4d56 (patch)
treef917d535d2387c917fcbefed2b2c850387dee437 /lib
parent57d4a16cfbbab9087925484207826446b14163b0 (diff)
downloadnextcloud-server-2a21471c74dc5a5e5e9859000316b385007d4d56.tar.gz
nextcloud-server-2a21471c74dc5a5e5e9859000316b385007d4d56.zip
make sure force language is reflected in html lang attribute
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/L10N/Factory.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php
index a7ffb401b7b..74cea7aa843 100644
--- a/lib/private/L10N/Factory.php
+++ b/lib/private/L10N/Factory.php
@@ -130,6 +130,12 @@ class Factory implements IFactory {
return $this->requestLanguage;
}
+ $forceLang = $this->config->getSystemValue('force_language', false);
+ if (is_string($forceLang) && $this->languageExists($app, $forceLang)) {
+ $this->requestLanguage = $forceLang;
+ return $forceLang;
+ }
+
/**
* At this point Nextcloud might not yet be installed and thus the lookup
* in the preferences table might fail. For this reason we need to check