Jasha Joachimsthal-2 wrote:
> 
>  
> 
>> -----Original Message-----
>> From: Smigge [mailto:[EMAIL PROTECTED] 
>> Sent: dinsdag 2 december 2008 8:18
>> To: users@cocoon.apache.org
>> 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: users@cocoon.apache.org
>> >> 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 
> 

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' "


Isn't there a simple of just changing the locale - even only within one
xslt?
-- 
View this message in context: 
http://www.nabble.com/How-to-set-the-language-for-a-date--tp20773396p20787797.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to