cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hepabolu <>
Subject Re: svn commit: r289973 - /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/generation/
Date Mon, 19 Sep 2005 19:02:12 GMT
Ugo Cei wrote:
> Il giorno 18/set/05, alle 23:00, ha scritto:
>> +    protected String weekdays[] = { "",
>> +            "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
>> +            "Friday", "Saturday"
>> +    };
> Since the CalendarGenerator strives to be localizable as far as 
> possible, wouldn't it be better to use Java I18N features for outputting 
> localized weekday names instead of this?
>     Ugo
True, I've thought about this, but I intended the weekday attribute to 
be used for comparisons like "is this a weekday or a weekend day". In 
that case you don't want to depend on the current locale. You cannot 
depend on the order in the list either, since the first day in the week 
list is the first day of the week for that particular locale.

I could of course put in the ordinal (i.e. Sunday = 1), but that means 
you always need extra info to figure out what is what, i.e. context that 
you don't have once the calendar is generated.

I18n localizations can still be done using the i18n transformer with 
these names as keys.


Bye, Helma

View raw message