*/
public function findLanguage(?string $appId = null): string {
// Step 1: Forced language always has precedence over anything else
- $forceLang = $this->config->getSystemValue('force_language', false);
+ $forceLang = $this->request->getParam('forceLanguage') ?? $this->config->getSystemValue('force_language', false);
if (is_string($forceLang)) {
$this->requestLanguage = $forceLang;
}
public function findGenericLanguage(?string $appId = null): string {
// Step 1: Forced language always has precedence over anything else
- $forcedLanguage = $this->config->getSystemValue('force_language', false);
+ $forcedLanguage = $this->request->getParam('forceLanguage') ?? $this->config->getSystemValue('force_language', false);
if ($forcedLanguage !== false) {
return $forcedLanguage;
}
return $language;
}
+ if (($forcedLanguage = $this->request->getParam('forceLanguage')) !== null) {
+ return $forcedLanguage;
+ }
+
// Use language from request
if ($this->userSession->getUser() instanceof IUser &&
$user->getUID() === $this->userSession->getUser()->getUID()) {
}
}
- return $this->config->getSystemValueString('default_language', 'en');
+ return $this->request->getParam('forceLanguage') ?? $this->config->getSystemValueString('default_language', 'en');
}
/**