[TYPO3-dev] get language labels from random extension

Dmitry Dulepov [typo3] dmitry at typo3.org
Mon Sep 10 14:49:52 CEST 2007


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.

-- 
Dmitry Dulepov
TYPO3 freelancer / TYPO3 core team member
Web: http://typo3bloke.net/
Skype: callto:liels_bugs




More information about the TYPO3-dev mailing list