[Typo3-dev] $LANG is always NULL

Olray Dragon olray-dragon at allanime.org
Thu Aug 4 17:45:38 CEST 2005


I'm just a TYPO3 newbie but afaik $LANG is only used in the backend. 
Multi language sites are using a GET/POST variable for language selection.

--- TS ahead!
config.linkVars = L

[globalVar = GP: L = 1]
config.sys_language_uid = 1
config.language = nl

[globalVar = GP: L = 2]
config.sys_language_uid = 2
config.language = de
---

The config.linkVars will tell TYPO to add the GET variable 'L' to every 
link which is created through TS. The rest of the code selects the 
system language according to this L parameter.

Does this help?

Olray

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.
> 
> 
> E.g. at the beginning of the class.tx_ttproducts.php:
> 
> /**
>  * Main method. Call this from TypoScript by a USER cObject.
>  */
> function main_products($content,$conf)    {
>     global $TSFE, $LANG;
>         // getting configuration values:
>     $this->conf=$conf;
> 
> debug($LANG,'main_products: $LANG', __LINE__, __FILE__);
> debug($GLOBALS['LANG'],'$GLOBALS[\'LANG\']', __LINE__, __FILE__);
> 
> 
> The variables always give back NULL as result.




More information about the TYPO3-dev mailing list