[TYPO3-mvc] eID and Translations
g4-lisz at tonarchiv.ch
g4-lisz at tonarchiv.ch
Tue Oct 28 19:05:58 CET 2014
On 10/28/2014 05:29 PM, Gion Koch wrote:
> Greetings,
>
>
> Currently I'm stuck with getting a translated message from an Ajax
> Request via eID. Everything works as it should, but not the
> translation part.
> I stumbled already several times over this issue.
> As a workaround I used an ugly hack:
> - including the sys_language_uid as hidden field
> - send it along with every ajax call
> - having a translation key for the default language with the
> sys_language_uid for every language as last part of the key. i.E.
> translation.key.0
>
> I would be eager to know, if there is clean way for handling this issue.
>
>
> Greetings
> Gion
>
Same here... I couldn't find an elegant solution. We get the "lang" from
the session:
$lang = $TSFE->getKey("ses", "lang");
switch($lang) {
case 0: tslib_eidtools::initLanguage('de'); break;
case 1: tslib_eidtools::initLanguage('fr'); break;
case 2: tslib_eidtools::initLanguage('it'); break;
default: tslib_eidtools::initLanguage('de');
}
$GLOBALS['LANG']->includeLLFile(PATH_site .
'typo3conf/ext/hplusinfo/Resources/Private/Language/locallang.xml');
$txt_more = $GLOBALS['LANG']->getLL('fe_search.showmore_txt')
Cheers,
Till
More information about the TYPO3-project-typo3v4mvc
mailing list