http://typo3.org/fileadmin/typo3api-4.2.6/d9/d7e/classlanguage.html#f8731834788a6ef5928b469cbbc579c7
前台:
$lang = t3lib_div::makeInstance(‘language’);
$lang->init($GLOBALS[‘TSFE’]->config[‘config’][‘language’]);
$lang->includeLLFile(‘EXT:ext_demo/locallang_db.xml’);
echo $lang->getLL(‘demo’);
$extLL = $GLOBALS['TSFE']->readLLfile(t3lib_extMgm::extPath('lang')
.'locallang_tca.xml')
$GLOBALS['TSFE']->getLLL('title', $extLL);
$GLOBALS['TSFE']->sL('LLL:dam/locallang_db.xml:tx_dam.title')
后台:
方法一:
$GLOBALS[‘LANG’]->includeLLFile(‘EXT:mm_forum/mod1/locallang.xml’);
$GLOBALS[‘LANG’]->getLL(‘menu.useradmin’)
$LANG->sL()
$LANG->getLL
(直接取出)
方法二:
$arrayname = $GLOBALS[‘LANG’]->readLLfile(‘EXT:mm_forum/mod1/locallang.xml’);
(返回一个数组)
方法三:
t3lib_div::readLLfile(‘EXT:mm_forum/mod1/locallang.xml’, $GLOBALS[‘TSFE’]->config[‘config’][‘language’], ‘utf-8’);