Forums / Extensions / Set language template.
Cyril LP
Wednesday 19 December 2007 8:40:17 am
Hi all,
I have an extention for payment gateway. This extention send automaticly a confirmation e-mail. My mail is a template, so in my source code i use : $tpl =& templateInit();
But how I configure the regional settings of the template, to have my mail in the good language ?
I try : $tpl->setvariable( 'language_code', 'eng-EU'); but it dosn't work...
Thanks in advance,
C
André R.
Wednesday 19 December 2007 1:34:19 pm
With "$tpl->setvariable( 'language_code', 'eng-EU');" you set a variable in the template named $language_code to further use it in the template, is that what you want?
eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription @: http://twitter.com/andrerom
Thursday 20 December 2007 12:29:29 am
Thanks for your answer. I want to set the language for the good translation of the template with the i18n function...
David P.
Tuesday 16 September 2008 7:40:40 am
Up!
I have the same problem with my custom extension.My "admin" siteaccess is in french, and my extension send some confirmation e-mail to customers (french or not!).
I would like to switch regional settings to good language (customer language) before parsing my mail template witch use i18n operator...
How can I do that?