aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/L10N/Factory.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php
index a3ff7bf70e2..426ddf6c380 100644
--- a/lib/private/L10N/Factory.php
+++ b/lib/private/L10N/Factory.php
@@ -431,6 +431,15 @@ class Factory implements IFactory {
if ($language !== null) {
return $language;
}
+
+ // Use language from request
+ if ($this->userSession->getUser() instanceof IUser &&
+ $user->getUID() === $this->userSession->getUser()->getUID()) {
+ try {
+ return $this->getLanguageFromRequest();
+ } catch (LanguageNotFoundException $e) {
+ }
+ }
}
return $this->config->getSystemValue('default_language', 'en');