Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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 <[email protected]>
  • Loading branch information
come-nc committed Oct 8, 2024
commit 1b8949ebac94339a359e159afe1480214a3b9746
2 changes: 1 addition & 1 deletion lib/private/L10N/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function get($app, $lang = null, $locale = null) {
$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;
}
Expand Down