> -----Original Message-----
> From: Smigge [mailto:[EMAIL PROTECTED]
> Sent: dinsdag 2 december 2008 8:18
> To: [email protected]
> Subject: RE: How to set the language for a date?
>
>
>
>
> Jasha Joachimsthal-2 wrote:
> >
> >
> >
> >> -----Original Message-----
> >> From: Smigge [mailto:[EMAIL PROTECTED]
> >> Sent: maandag 1 december 2008 15:53
> >> To: [email protected]
> >> Subject: How to set the language for a date?
> >>
> >>
> >> I'm using http://exslt.org/dates-and-times for creating dates, but
> >> it's creating the times in my system language. I would
> like to change
> >> this to English. How can this be done?
> >>
> >> I'm also currently using the troublesome way of putting
> the formats,
> >> by using date:month-abbreviation() and such separately instead of
> >> just putting the date-format as a string. How could this
> be done in a
> >> more neat manner?
> >
> > By using the i18nTransformer
> > http://cocoon.apache.org/2.1/userdocs/i18nTransformer.html#i18n_date
> >
> >
> > Jasha Joachimsthal
> >
> > [EMAIL PROTECTED] - [EMAIL PROTECTED]
> >
> > www.onehippo.com
> > Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam
> +31(0)20-5224466
> > San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
> > 94952-5100 +1 (707) 773-4646
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> Shouldn't it be somehow directly settable, since there is an
> existing lang attribute? By default it just takes the system
> language, and I just don't know how it should be set.
>
> <date:date-format
> name = qname
> calendar = "gregorian" | qname-but-not-ncname
> lang = language
> first-day-of-week = "sunday" | "monday" | "tuesday" |
> "wednesday" | "thursday" | "friday" | "saturday" | string />
> --
You can pass the language to the i18n transformer through the sitemap by
using
<map:transform type="i18n">
<map:parameter name="locale" value="en_US"/><!-- US English -->
</map:transform>
Jasha Joachimsthal
[EMAIL PROTECTED] - [EMAIL PROTECTED]
www.onehippo.com
Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466
San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
94952-5100 +1 (707) 773-4646
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]