[TYPO3-dev] ExtJs in the TYPO3 BE how-to questions?

Steffen Kamper info at sk-typo3.de
Tue Feb 22 11:59:57 CET 2011


Hi,

Am 22.02.2011 11:57, schrieb Steffen Kamper:
>>
>
> 1)
> pagerenderer has a method to include a language file for javascript.
> This is simular to the inclusion via LANG you do for php.
> Example:
> $this->pageRenderer->addInlineLanguageLabelFile(t3lib_extMgm::extPath('em',
> 'language/locallang.xml'));
>
> 2)
> If you have some single labels to include, just define an array with
> these labels like
> $labels['yes'] =
> $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:yes');
> $labels['no'] =
> $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:no');
> $this->pageRenderer->addInlineLanguageLabelArray($labels);
>
> You can do that additional to step 1.
>

forgot to mention: once this is done, labels are found with 
TYPO3.lang.[labelname]
Try to avoid labelnames with dot (again), as this is an array seperator 
in javascript.

vg Steffen




More information about the TYPO3-dev mailing list