Ugo Cei wrote:
Il giorno 18/set/05, alle 23:00, [EMAIL PROTECTED] 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.

WDYT?

Bye, Helma

Reply via email to