[TYPO3-dev] get language labels from random extension

Brian Bendtsen nightowl at galnet.dk
Tue Sep 11 14:05:49 CEST 2007


Brian Bendtsen skrev:
> Martin Kutschker skrev:
>> Try this:
>>
>> <?php
>>
>> $this_is_global = 1;
>>
>> function x() {
>>   $this_is_local = 2;
>>   $GLOBALS['this_is_global'] = 3;
>> }
>>
>> echo "$this_is_global\n";
>> x();
>> echo "$this_is_global\n";
>>
>> ?>
>>
>> Masi
> 
> Thanks, I dont get any errors now, but I dont get my language labels 
> either.
> 
> I have done this outside any function:
> require_once (PATH_site . 'typo3/sysext/lang/lang.php');
> $LANG = t3lib_div::makeInstance('language');
> 
> And this inside my function:
> 
> $GLOBALS['LANG']->includeLLFile('EXT/indmeldelse/locallang_db.xml');
> $GLOBALS['LANG']->getLL('tx_indmeldelse_medlem.name')
> $GLOBALS['LANG']->getLL('tx_indmeldelse_medlem.city')
> $GLOBALS['LANG']->getLL('tx_indmeldelse_medlem.zipcode')
> 
> Any idea where the error is?
> 
> /BB
Is there nothing I can "try" to find out where the error is?

I have tried inserting the code in a frontend plugin just to see if I 
can get a label and here it works.

/BB




More information about the TYPO3-dev mailing list