Cronjobs, mail and i18n

Author Message

Maxime Thomas

Friday 05 January 2007 1:51:01 am

Hi,

I'm working with ez 3.8.6, multi language site.

I've made a cronjob which must send emails to some users.

For each user, I can have have is language (it's an attribute I've had to the class).

But, in the cronjob, I've no idea of what is the current language (en, fr, es) and even if I could know this, how can I specify to the PHP function ezi18n() what is the translation I want.

<b>So, how could I make a correct translation using i18n feature of eZ publish into a cronjob ?</b>

If any one has an idea...

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Maxime Thomas

Thursday 11 January 2007 3:02:32 am

I've got a solution :

When I run the cronjob I can put a siteaccess parameter in the line command, so I can use the ezi18n() function properly with the locale declared in the site.ini of the correct siteaccess.

But I was wondering if I can explicitly get a specific translation for a given language using a ezi18n like...

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

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