[TYPO3-dev] Overwriting default language in template
Alain Gaymard
TYPO3 at STudio26.dyndns.org
Thu Aug 25 09:17:45 CEST 2011
Hello
I've got a website running in many languages. In each branch I've
defined the language in templates (+ext). For instance
config.language = de
and
config.language = en
In an extension I need to display a english content on a german page or
a german content on an english page using locallang.php and a template.
$this->pi_loadLL();
// [...] template loaded, TemplateParts initialised
$MarkerArray = array();
$SubpartsArray = array();
$MarkerArray['###HELLO###'] = $this->pi_getLL("hello","[ml]hello").';
$ouput = $this->cObj->substituteMarkerArrayCached(
$this->TemplateParts['subscribemail'],
$MarkerArray,
$SubpartsArray, array());
Is there a way to temporary change the language used to generate the
template output in the extension? I presume it is config.language that
is used to decide which language to use in pi_getLL().
Thanks in advance
--
Alain
More information about the TYPO3-dev
mailing list