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-24 13:09:15 +0200
commit0dc1b3e741caa3a160aff9c2680e5db024d54a71 (patch)
treeeea70dc6790a539057e26a749f0dc3ea18e4403a /lib
parentb9584e1b2519f752d33ffae7aea7e32023977c35 (diff)
downloadnextcloud-server-0dc1b3e741caa3a160aff9c2680e5db024d54a71.tar.gz
nextcloud-server-0dc1b3e741caa3a160aff9c2680e5db024d54a71.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 399bebb8189..658a8793c69 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