[TYPO3-dev] Overwriting default language in template

Alain Gaymard TYPO3 at STudio26.dyndns.org
Thu Aug 25 14:26:54 CEST 2011


Hi Benjamin
Of course, but I don't only have two languages, but many. I can be on a 
page in one language (defined by $this->LLkey) and want to display 
another language ('en'). I've chosen english in my sample to shorten the 
example.
I only need to change it if the key is not the same.
By the way, is it time consuming to reload the locallang.xml?

Le 25.08.2011 13:48, Benjamin Beck a écrit :
> Hi,
>
> why not shorter (just transformed your expression ..):
>
> if ('en' != $this->LLkey) { // set the new language
>     $this->LLkey = 'en';
>     $this->LOCAL_LANG_loaded = 0;
>     // reload the translations in the new language
>     $this->pi_loadLL();
> }
>
> Grüße Benjamin

-- 
Alain






More information about the TYPO3-dev mailing list