[BUGFIX] Reimplement custom BE languages 68/59068/7
authorGuido Schmechel <guido.schmechel@brandung.de>
Sun, 9 Dec 2018 11:12:25 +0000 (12:12 +0100)
committerBenni Mack <benni@typo3.org>
Thu, 20 Dec 2018 12:56:18 +0000 (13:56 +0100)
Because of a regression the backend does not load custom BE languages.
The loading order is changed so that custom languages are available
again.

Resolves: #87101
Releases: master, 9.5
Change-Id: I0530957abc49f775497d9644047cbb49ceffcda9
Reviewed-on: https://review.typo3.org/59068
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/setup/Classes/Controller/SetupModuleController.php

index 0c8c08e..93905ad 100644 (file)
@@ -40,6 +40,7 @@ use TYPO3\CMS\Core\Error\Http\ShortcutTargetPageNotFoundException;
 use TYPO3\CMS\Core\Exception\Page\RootLineException;
 use TYPO3\CMS\Core\Http\ImmediateResponseException;
 use TYPO3\CMS\Core\Localization\LanguageService;
+use TYPO3\CMS\Core\Localization\Locales;
 use TYPO3\CMS\Core\Locking\Exception\LockAcquireWouldBlockException;
 use TYPO3\CMS\Core\Locking\LockFactory;
 use TYPO3\CMS\Core\Locking\LockingStrategyInterface;
@@ -1988,6 +1989,8 @@ class TypoScriptFrontendController implements LoggerAwareInterface
             GeneralUtility::callUserFunction($_funcRef, $_params, $this);
         }
 
+        Locales::initialize();
+
         $siteLanguage = $this->getCurrentSiteLanguage();
 
         // Initialize charset settings etc.
index 37dc1e8..2272f4b 100644 (file)
@@ -694,7 +694,7 @@ class SetupModuleController
                         $localizedName = htmlspecialchars($name);
                     }
                     $localLabel = '  -  [' . htmlspecialchars($defaultName) . ']';
-                    $available = in_array($locale, $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lang']['availableLanguages'], true) && is_dir(Environment::getLabelsPath() . '/' . $locale);
+                    $available = in_array($locale, $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lang']['availableLanguages'], true) || is_dir(Environment::getLabelsPath() . '/' . $locale);
                     if ($available) {
                         $languageOptions[$defaultName] = '<option value="' . $locale . '"' . ($backendUser->uc['lang'] === $locale ? ' selected="selected"' : '') . '>' . $localizedName . $localLabel . '</option>';
                     }