From 1b8949ebac94339a359e159afe1480214a3b9746 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Tue, 8 Oct 2024 14:44:03 +0200 Subject: [PATCH] feat(l10n): Allow to force language with a query parameter MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- lib/private/L10N/Factory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.5