[BUGFIX] Fix Language in typo3 9.5

This commit is contained in:
wadichaabene 2025-03-10 22:32:37 +01:00
parent cd116df569
commit 9acf239483

View File

@ -41,7 +41,11 @@ class TranslationController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionCont
$languageFactory = GeneralUtility::makeInstance(
LocalizationFactory::class
);
$language = $this->request->getAttribute('language');
if (version_compare(TYPO3_branch, '10.0', '>=')) {
$language = $this->request->getAttribute('language');
} else {
$language = $GLOBALS['TYPO3_REQUEST']->getAttribute('language');
}
$locale = $language->getLocale();
//\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
// $locale, '$locale', 3, true, false