[TYPO3-dev] Overwriting default language in template

Benjamin Beck BenjaminBeck at gmx.de
Thu Aug 25 13:48:32 CEST 2011


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

On Aug 25, 2011, at 12:12 PM, Alain Gaymard wrote:

> Hi Jan,
> 
> thanks for the clue.
> As $this->LOCAL_LANG is loaded in only one language (the current one) we need to reload it, I've done this:
> 
> $this->oldLangauge = $this->LLkey;
> $this->LLkey = 'en';
> if ($this->oldLanguage != $this->LLkey) { // set the new language
>    $this->LOCAL_LANG_loaded = 0;
>    // reload the translations in the new language
>    $this->pi_loadLL();
> }
> // call the $this->pi_getLL()
> // restore the old language
> 
> 
> Le 25.08.2011 10:41, Jan Bednarik a écrit :
> > Hi Alain,
> >
> > quick look at the pi_getLL function gives an answer:
> >
> > $this->LOCAL_LANG[$this->LLkey][$key]
> >
> > so you just need to change $this->LLkey for a while and that's it.
> >
> > Jan
> 
> -- 
> Alain
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev





More information about the TYPO3-dev mailing list