[TYPO3-dev] get language labels from random extension

Brian Bendtsen nightowl at galnet.dk
Tue Sep 11 10:15:11 CEST 2007


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




More information about the TYPO3-dev mailing list