[Typo3-dev] $TCA labels translation

Robert Lemke robert at typo3.org
Sat Aug 13 11:39:50 CEST 2005


Hi Elmar,

Elmar Hinz wrote:

> in $TCA labels are internationalized by strings like this:
> 
> LLL:EXT:s_building/locallang_db.php:tx_sbuilding_s.b_title
> 
> Is there a function that takes such a string and directly returns the
> translation for the current language.
> 
> Hint: Context is a FE - Plugin that wants to read the $TCA.

Have a look at the class tslib_fe, there are some methods you're looking
for:

echo ($GLOBALS['TSFE']->sL
('LLL:EXT:s_building/locallang_db.php:tx_sbuilding_s.b_title'));

You might need to load the $TCA by calling t3lib_div::loadTCA() on
beforehand.

Cheers,
robert

-- 
Robert Lemke
TYPO3 Association - Research & Development
Member of the board
http://association.typo3.org





More information about the TYPO3-dev mailing list