Translate the day and Month in Dutch
hello, I've an agenda with event in dutch, mij server uses English day & month names. Is there a function or something like that to translate them into dutch. Friday -> Vrijdag and January -> januari. Who can help me ?? Martin Koekenberg
I'm not sure what you are using, but the calendar tag (from the Calendar product) has multi-language support: <dtml-calendar lang=du mode="month"> </dtml-calendar> and when you're not satisfied with the translations you can insert even your own: <dtml-call "setCalendar('daynames',['zo','ma','di','wo','do','vr','za'])"> hth cb ----- Original Message ----- From: "Martin Koekenberg" <zope@digital-adventures.nl> To: <zope@zope.org> Sent: Monday, December 16, 2002 2:09 PM Subject: [Zope] Translate the day and Month in Dutch
hello,
I've an agenda with event in dutch, mij server uses English day & month names. Is there a function or something like that to translate them into dutch. Friday -> Vrijdag and January -> januari.
Who can help me ??
Martin Koekenberg
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
---- Original Message ----- From: "Martin Koekenberg" <zope@digital-adventures.nl> To: <zope@zope.org> Sent: Monday, December 16, 2002 2:09 PM Subject: [Zope] Translate the day and Month in Dutch
hello,
I've an agenda with event in dutch, mij server uses English day & month names. Is there a function or something like that to translate them into dutch. Friday -> Vrijdag and January -> januari.
Who can help me ??
Martin Koekenberg
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Hi, I made this small TTW script to get the date in a French manner. You just need to translate the lists "jours" and "mois" respectively with the list of day names (starting from sunday) and month names (starting with an empty string, then january,..., december). The "dto" parameter is expected to be a Zope DateTime object. Hope this helps. --Gilles ## Script (Python) "datefr" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=dto ##title=Date en français ## # # Paramètre : # dto : objet de type DateTime # jours = ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'] mois = ['', 'janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'] fdate = jours[dto.dow()] + ', ' jj = dto.day() if jj == 1: jj = '1er' return fdate + str(jj) + ' ' + mois[dto.month()] + ' ' + str(dto.year())
On Mon, 2002-12-16 at 14:09, Martin Koekenberg wrote:
hello,
I've an agenda with event in dutch, mij server uses English day & month names. Is there a function or something like that to translate them into dutch. Friday -> Vrijdag and January -> januari.
Who can help me ??
Do you use dutch language only in your site ?? If so, just set the "LOCALE_ID" parameter in your z2.py to your own locale, and then everything will be OK for you (I use it like this on a french intranet site, with LOCALE_ID="fr_FR", without any problem...) Thierry
participants (4)
-
Cornelis J. de Brabander -
Gilles Lenfant -
Martin Koekenberg -
Thierry Florac