[Typo3-dev] $LANG is always NULL

Stefan Geith typo3dev at geithware.de
Thu Aug 4 17:02:06 CEST 2005


Franz Holzinger schrieb:
> Hello,
> 
> at the site  http://81.223.48.238/sbmp.at/Monitore.28.0.html
>   I have a problem with the $LANG and $GLOBALS['LANG'] variables.

Hello,

I had that problem too with my extensions.
I solved it with these lines in my code:

	if (!is_object($GLOBALS['LANG'])) {
		require_once(t3lib_extMgm::extPath('lang').'lang.php');
		$GLOBALS['LANG'] = t3lib_div::makeInstance('language');
		$GLOBALS['LANG']->init('default');
	}

But I dont know, _why_ $LANG is null.
It is only NULL, when I am logged into the Backend AND have
AdminPanel enabled ...
No AminPanel - no Problem ...  8-o

-

Stefan





More information about the TYPO3-dev mailing list