The users country and preferred language and other facts will be detected. Depending on configurable rules the user can be redirected to other languages or pages. New functionality can be added easily.
in the file:
typo3conf/ext/locate/Classes/Middleware/LanguageRedirectMiddleware.php
the line: $typoScript = $GLOBALS['TSFE']->tmpl->setup;
works only when the page is not cached. After the Page get chached, the $GLOBALS['TSFE']->tmpl->setup will return an empty array()
you should change it to:
if ($GLOBALS['TSFE']->tmpl === null || ($GLOBALS['TSFE']->tmpl && empty($GLOBALS['TSFE']->tmpl->setup))) {
$GLOBALS['TSFE']->forceTemplateParsing = true;
$GLOBALS['TSFE']->getConfigArray();
}
$typoScript = $GLOBALS['TSFE']->tmpl->setup;
in the file: typo3conf/ext/locate/Classes/Middleware/LanguageRedirectMiddleware.php
the line: $typoScript = $GLOBALS['TSFE']->tmpl->setup; works only when the page is not cached. After the Page get chached, the $GLOBALS['TSFE']->tmpl->setup will return an empty array()
you should change it to: if ($GLOBALS['TSFE']->tmpl === null || ($GLOBALS['TSFE']->tmpl && empty($GLOBALS['TSFE']->tmpl->setup))) { $GLOBALS['TSFE']->forceTemplateParsing = true; $GLOBALS['TSFE']->getConfigArray(); } $typoScript = $GLOBALS['TSFE']->tmpl->setup;
in order to generate the typoscript array