aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-10-08 14:44:03 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2024-10-08 14:44:03 +0200
commit1b8949ebac94339a359e159afe1480214a3b9746 (patch)
tree612219df5a5af901e8da2d823ce3aefe47ab71a2 /lib/private
parent414430980a9efa3ced924d092ef50d336b2b7dde (diff)
downloadnextcloud-server-1b8949ebac94339a359e159afe1480214a3b9746.tar.gz
nextcloud-server-1b8949ebac94339a359e159afe1480214a3b9746.zip
feat(l10n): Allow to force language with a query parameter
This will be used by support application to always generate the support report in english. It may also be used to debug a language, or to temporarily show a page in an other language to take a screenshot or to share your screen with someone speaking another language. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/L10N/Factory.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php
index ecf7381ba99..dc65714c11b 100644
--- a/lib/private/L10N/Factory.php
+++ b/lib/private/L10N/Factory.php
@@ -98,7 +98,7 @@ class Factory implements IFactory {
$lang = str_replace(['\0', '/', '\\', '..'], '', $lang);
}
- $forceLang = $this->config->getSystemValue('force_language', false);
+ $forceLang = $this->request->getParam('forceLanguage') ?? $this->config->getSystemValue('force_language', false);
if (is_string($forceLang)) {
$lang = $forceLang;
}