> -----Original Message-----
> From: Smigge [mailto:[EMAIL PROTECTED] 
> Sent: dinsdag 2 december 2008 9:22
> 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: 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_dat
> >> > e
> >> > 
> >> > 
> >> > 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
> > 
> 
> Okay, this is probably a stupid question, but how? If I try to use the
> transformer without defining it first it says 
> 
> "Type 'i18n' is not defined for 'transform' at..."
> 
> And if I try define it in the transformers elements, it says:
> 
> "Unable to determine class name for component named 'i18n' "

If the transformer is not yet defined in your sitemap or its ancestors
you'll have to define it in map:components --> map:transformers.

<map:transformer name="i18n"
     src="org.apache.cocoon.transformation.I18nTransformer">
     <catalogues default="messages">
       <catalogue id="messages" name="messages"
location="translations"/>
       </catalogues>
</map:transformer>

Jasha
 
> 
> Isn't there a simple way of just changing the locale - even 
> only within one
> xslt?
Then you have to do it by hand. You can pass a parameters to the xsl by
using <map:parameter name="parametername" value="parametervalue"/>


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]

Reply via email to