diff --git a/Dockerfile b/Dockerfile index b30d660109bd08ba1327a636b0b1ac86c34dbf2d..c5c907528102d9b4a4b04d620c9cd6818f3484b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -144,6 +144,7 @@ RUN patch -u ${BASE_DIR}/apps/dav/lib/CalDAV/Reminder/ReminderService.php -i ${T RUN patch -u ${BASE_DIR}/apps/theming/lib/Themes/CommonThemeTrait.php -i ${TMP_PATCH_DIR}/026-primary-color-fix.patch RUN patch -u ${BASE_DIR}/lib/private/Preview/Watcher.php -i ${TMP_PATCH_DIR}/030-preview-watcher-null-check.patch RUN patch -u ${BASE_DIR}/lib/private/Template/JSResourceLocator.php -i ${TMP_PATCH_DIR}/031-theme-custom-app-translations.patch +RUN patch -u ${BASE_DIR}/lib/private/L10N/Factory.php -i ${TMP_PATCH_DIR}/032-select-lang-from-session.patch RUN rm -rf ${TMP_PATCH_DIR} diff --git a/patches/032-select-lang-from-session.patch b/patches/032-select-lang-from-session.patch new file mode 100644 index 0000000000000000000000000000000000000000..6e8d456a3be054534536e0c9f9b9d47f2d45e95e --- /dev/null +++ b/patches/032-select-lang-from-session.patch @@ -0,0 +1,21 @@ +From: Akhil +Date: Fri, 29 Nov 2023 17:50:00 +0530 +Subject: [PATCH] Check session to select language + +$_SERVER in IRequest is immutable but we want to switch the header to deliver translation files correctly + +--- lib/private/L10N/Factory.php 2023-11-29 17:46:48.253716340 +0530 ++++ lib/private/L10N/Factory-new.php 2023-11-29 17:47:26.194920628 +0530 +@@ -478,7 +478,11 @@ + * @throws LanguageNotFoundException + */ + private function getLanguageFromRequest(?string $app = null): string { +- $header = $this->request->getHeader('ACCEPT_LANGUAGE'); ++ // $header = $this->request->getHeader('ACCEPT_LANGUAGE'); ++ $header = ''; ++ if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { ++ $header = $_SERVER['HTTP_ACCEPT_LANGUAGE']; ++ } + if ($header !== '') { + $available = $this->findAvailableLanguages($app); +