[TYPO3-mvc] Localization problem

Tomas Majer majer at monogram.sk
Tue Jan 19 22:51:38 CET 2010


Hi all

I found one problem with Localization class from Extbase

I use translate view helper (in myExt extension) with simple key: 
<f:translate key="my_key" /> output looks OK a i get localized 
string(respect $GLOBALS['config']['language'] settings) from 
myExt/Resources/Private/Language/locallang.xml

But when i use localized string from another extension: <f:translate 
key="LLL:EXT:otherExt/Resources/Private/Language/locallang.xml:some_key" 
/> i always get localized string to 'default' language

I loked at Localization class and this locallang keys from another 
extensions are handled by method translateFileReference($key)

I modified this method(set default language) and everything looks OK:

protected function translateFileReference($key) {
	if (isset($GLOBALS['TSFE']->config['config']['language'])) {
		$GLOBALS['LANG']->lang = $GLOBALS['TSFE']->config['config']['language'];
	}
	// old stuff ...
}

can you explain this behaviour of Localization class or i did something 
wrong?


Thanks for your help

tomaj


More information about the TYPO3-project-typo3v4mvc mailing list