View Single Post
  #6 (permalink)  
Old 01-31-2008, 02:52 AM
deepblue deepblue is offline
Partner (VAR/HSP)
 
Posts: 200
Default

Hi,

although this thread is quite old I want to pick it up again. I just finished writing a german date zimlet: http://www.efm.de/zimlets/com_zimbra_date_de.zip

While modifying the original version of the date zimlet to recognize german date formats, I also stumbled upon the question on how to handle english or french date formats received in mail in english or french language.

My first Idea was to bind the localized version of the zimlet in some way to the language setting of the Users UI (which is available since ZCS 5.0).

But this approach misses the point: The language setting of the User has nothing to do with the langage and the date formats in a mail.

So I think it would be a much better approach to have one date zimlet which automagically detects the langauge a mail is written in, and adjusts its behaviour to this language.

How could this be done? I know that spamassassin can try to detect the language and add a X-language header (google for Mail::SpamAssassin::Plugin::TextCat). But as Zimbra uses Amavis, SA is not able to directly write X-headers. And I dont know if Amavis could do that.

However, if one could obtain the information of the "source language" of a mail, it would be possible to write ONE date zimlet matching all possible date formats....

Regards
Thomas
Reply With Quote