[TYPO3] Force Language and L-parameter
Stefan Steinbeck
stefan_steinbeck at yahoo.de
Fri Dec 29 16:41:24 CET 2006
Ralf Hettinger wrote:
> I'm not quite sure but it might be fixed by the modified script.
>
> Could you check and let me know?
> If it doesn't work you could try to include the script with
> page.includeLibs.checkSetLangVar = path/to/the/script.php
Hi Ralf,
thank for your fast reply! The site with all its extensions do seem to
work now properly :)
I had to add two more lines to your script though. The url of base tag
was somehow no recomputed so I added: TSpagegen::pagegenInit();
Secondly I added already yesterday
$GLOBALS['TSFE']->sys_page->sys_language_uid = 1;
But to be honest I don't even know why anymore, though it helped to cure
that problem. And I also don't not if this parameter is not set by one
of the other init functions. So my resulting code looks now:
if (t3lib_div::_GET('L')=='') {
$GLOBALS['TSFE']->linkVars.='&L=1';
$GLOBALS['TSFE']->sys_page->sys_language_uid = 1 ;
t3lib_div::_GETset('1','L');
// @see index_ts.php
$GLOBALS['TSFE']->initTemplate();
$GLOBALS['TSFE']->getFromCache();
$GLOBALS['TSFE']->getConfigArray();
$GLOBALS['TSFE']->convPOSTCharset();
$GLOBALS['TSFE']->settingLanguage();
$GLOBALS['TSFE']->settingLocale();
TSpagegen::pagegenInit();
}
This is probably still like hunting for sparrows with rockets, but it do
seem to work.
Cheers and a happy new year,
Stefan
More information about the TYPO3-english
mailing list