[BUGFIX] Allow user defined locales to work with TSFE->sL() 85/25685/2
authorReinhard Führicht <rf@typoheads.at>
Tue, 26 Nov 2013 10:30:40 +0000 (11:30 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Tue, 1 Apr 2014 08:25:03 +0000 (10:25 +0200)
TYPO3 uses a list of "known" languages defined in
TYPO3\CMS\Core\Localization\Locales.

This list can be extended by the user, but these changes
are not taken into account when using
$GLOBALS['TSFE']->sL() to fetch the translation.

Make TypoScriptFrontendController call the needed method
"initialize()" to make it work.

Resolves: #53973
Releases: 6.2, 6.1
Change-Id: I9fc80ba976bf796f272591ac741d8bf4e92cbeb3
Reviewed-on: https://review.typo3.org/25685
Reviewed-by: Wouter Wolters
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php

index 269cec9..ecd0abf 100644 (file)
@@ -4612,6 +4612,7 @@ if (version == "n3") {
                // on the $lang key being inputted to this function.
                /** @var $locales \TYPO3\CMS\Core\Localization\Locales */
                $locales = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Localization\\Locales');
+               $locales->initialize();
 
                // Language is found. Configure it:
                if (in_array($this->lang, $locales->getLocales())) {