pooja patel
pooja patel

Reputation: 33

TYPO3 extBase Labels in Controller

I am using TYPO3 6.2 CMS version. I want to use dynamic labels in controller but I can't find a way.

I tried with below one but it's taking to much time for loading.

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

Any other idea?

Upvotes: 3

Views: 4525

Answers (1)

Ghanshyam Gohel
Ghanshyam Gohel

Reputation: 1274

Yes, for label in extbase you can use

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

but somehow it's not working at all.

I have found solution may your help:

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

It's work fine for me try it :)

Upvotes: 9

Related Questions