summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-06-22 12:47:00 -0500
committerGitHub <noreply@github.com>2017-06-22 12:47:00 -0500
commitd611d9c126e677b29466f537a4166cfd0ea5de2a (patch)
treea74f99aaa4300179b094064cd1da232ff98e6cde /lib/private
parent65b4e2a1db8642086d5415df6219b7c33d9399f1 (diff)
parent07a0f95ebf676b31514a5cbb55025dc121a985a6 (diff)
downloadnextcloud-server-d611d9c126e677b29466f537a4166cfd0ea5de2a.tar.gz
nextcloud-server-d611d9c126e677b29466f537a4166cfd0ea5de2a.zip
Merge pull request #5498 from nextcloud/allow-to-force-a-language
Allow to force a language and set it via the ocs api
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/L10N/Factory.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php
index 581ca3fb5d1..399bebb8189 100644
--- a/lib/private/L10N/Factory.php
+++ b/lib/private/L10N/Factory.php
@@ -99,6 +99,12 @@ class Factory implements IFactory {
if ($lang !== null) {
$lang = str_replace(array('\0', '/', '\\', '..'), '', (string) $lang);
}
+
+ $forceLang = $this->config->getSystemValue('force_language', false);
+ if (is_string($forceLang)) {
+ $lang = $forceLang;
+ }
+
if ($lang === null || !$this->languageExists($app, $lang)) {
$lang = $this->findLanguage($app);
}
@@ -125,7 +131,7 @@ class Factory implements IFactory {
}
/**
- * At this point ownCloud might not yet be installed and thus the lookup
+ * 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
* whether the instance has already been installed
*