Set template language for emailing (i18n)

Author Message

David P.

Wednesday 17 September 2008 5:33:40 am

Hello,

I have a custom extension for customer relationship management. This extension send some information e-mail to customers (french or not!) when the administrative manager begin some events. She uses this extension on the "admin" siteaccess in french.
So, email sent to customer are in french!

My mail body is a template :

$tpl_mail =& templateInit();
$body  =& $tpl_mail->fetch( 'design:mailing/mailcustomer.tpl' );
$mail = new eZMail();
$mail->setBody( $body );		                              
$mailing = eZMailTransport::send( $mail );

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? How can I set the language (locale) for a good template translation with the i18n function?

Sorry for my bad english...
Thanks!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.