[TYPO3-ect] locallang_db.xml not translated by lib/div
Michael Knoll
mimi at kaktusteam.de
Mon Sep 24 02:42:47 CEST 2007
Hi list,
I have a translation problem with lib/div. I have the following string,
which I would like to translate:
LLL:EXT:mklv_community/locallang_db.xml:tx_mklvcommunity_privacy_setting.privacy_flag.I.0
I need to do that in my model. I therefore overwrite my constructor and
use tx_lib_translator inside my model like that:
function tx_mklvcommunity_models_userPrivacy
($param1 = null, $param2 = null) {
$this->translator = new tx_lib_translator($param1);
$this->translator->setPathToLanguageFile(
$param1->configurations['pathToDbLanguageFile']);
parent::tx_lib_objectBase($param1, $param2);
}
According to a var_dump, the path to the language file is set correctly.
Now I try to translate my content with the following call to the
translator object:
$tmp['description'] = $this->translator->translate($privacyItem[0]);
But all I get is the untranslated content. Can anybody tell me, how I
can translate my texts with my locallang files?!? Does this work at all
with lib/div???
Thanks for your assistance!
Mimi
More information about the TYPO3-team-extension-coordination
mailing list