[TYPO3-dev] get language labels from random extension
Brian Bendtsen
nightowl at galnet.dk
Mon Sep 10 15:40:30 CEST 2007
Dmitry Dulepov [typo3] skrev:
> Hi!
>
> Brian Bendtsen wrote:
>> Im currently working on an extension(not a frontend ext.) where I need
>> som language labels from another extension. How is this done?
>
> Look into functions inside typo3/sysext/lang/lang.php. The class there
> is usually available as $GLOBALS['LANG']. You can use one of two functions:
>
> $var = $GLOBALS['LANG']->sL('LLL:EXT/extkey/lacallang.xml:whatever.key')
>
> or
>
> includeLLFile('EXT/extkey/lacallang.xml');
> $var = $GLOBALS['LANG']->getLL('whatever.key');
>
> Second os preferable if you need to get many values.
>
I get this error:
PHP Fatal error: Call to a member function includeLLFile() on a non-object
Would am I missing?
/BB
More information about the TYPO3-dev
mailing list