TYPO3 extBase labels in the controller

I am using TYPO3 6.2 CMS version . I want to use dynamic labels in my controller, but I cannot find a way.

I tried from below, but it takes a long time to load.

$GLOBALS['LANG']
->sL('LLL:EXT:arzte/Resources/Private/Language/locallang.xlf:tx_extension_name');

      

Any other idea?

+3


source to share


1 answer


Yes, for a label in extbase you can use

$ GLOBALS ['LANG'] → Sl ('LLL: EXT: Arzte / Resources / Individuals / Language / locallang.xlf: tx_extension_name');

but somehow it doesn't work at all.



I found a solution that might help you:

\ TYPO3 \ CMS \ Extbase \ Utility \ LocalizationUtility :: translate ('your_label_key', 'your_extensionName');

It works great for me, try it :)

+6


source







All Articles