Hello Chanchao,

Monday, July 15, 2002 at 15:26 GMT +0700, was when inspiration
required Chanchao [C] to write:

C> Now I would like to translate this date from English into another
C> language, so change for example 'Monday' into 'Lundi', Tuesday into
C> "Mardi' and so on, same with the months of the year. Is there such
C> a macro

Yes.  But it all depends on where you want to get the date from.  If
you want it from the GMT time, then use (I apologize for any spelling
mistakes in the French names, it's been a long time since I've used my
French):

=====[Begin Date-Day QT]=====
%REM="Do the translation of the weekday"%-
%Comment="%-
%-%-%SETPATTREGEXP='(?im-s)^Date\:.*(Sun|Mon|Tue|Wed|Thu|Fri|Sat)'%-
%-%-%REGEXPMATCH='%Headers'"%-
%-
%IF:"%Comment"="Sun":"Dimanche":""%-
%IF:"%Comment"="Mon":"Lundi":""%-
%IF:"%Comment"="Tue":"Mardi":""%-
%IF:"%Comment"="Wed":"Mercredi":""%-
%IF:"%Comment"="Thu":"Jeudi":""%-
%IF:"%Comment"="Fri":"Vendredi":""%-
%IF:"%Comment"="Sat":"Samdi":""%-
%-
%Comment=""%-
=====[ End  Date-Day QT]=====

If you want to use the date from the %ODATE macro, replace the two
lines that start with "%-%-" by:
%ODATE='ddd'%-

For the month, use:

=====[Begin Date-Month QT]=====
%REM="Do Month translation"%-
%Comment="%-
%-%-%SETPATTREGEXP='(?im-s)^Date\:.*(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)'%-
%-%-%REGEXPMATCH='%Headers'"%-
%-
%IF:"%Comment"="Jan":"janvier":""%-
%IF:"%Comment"="Feb":"f�vrier":""%-
%IF:"%Comment"="Mar":"mars":""%-
%IF:"%Comment"="Apr":"avril":""%-
%IF:"%Comment"="May":"mai":""%-
%IF:"%Comment"="Jun":"juin":""%-
%IF:"%Comment"="Jul":"juillet":""%-
%IF:"%Comment"="Aug":"ao�t":""%-
%IF:"%Comment"="Sep":"septembre":""%-
%IF:"%Comment"="Oct":"octobre":""%-
%IF:"%Comment"="Nov":"novembre":""%-
%IF:"%Comment"="Dec":"d�cembre":""%-
%-
%Comment=""%-
=====[ End  Date-Month QT]=====

Again, you can replace the two lines that start with %-%- by:
%ODATE='mmm'

C> and can it be run AFTER the date is inserted?

You can certainly run those any time in the template system.  If you
mean after the message has been sent, then no.

-- 
Thanks for writing,
 Januk Aggarwal

I'm really easy to get along with once you people learn to worship me.


________________________________________________________
Current Ver: 1.61
FAQ        : http://faq.thebat.dutaint.com 
Unsubscribe: mailto:[EMAIL PROTECTED]
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Bug Reports: https://www.ritlabs.com/bt/

Reply via email to