Hi,

I looked a bit more at how Locales worked since I had never used them.
And noticed the following things:

The LocalInformation_nl that I send you has a wrong shortDateFromat
(see diff.1)

java.util.Calendar wants to get the key "firstDayOfWeek", but the classes
in gnu.java.local define it as "firstDayInWeek". (see diff.2)

The java.lang.String methods toLowerCase() and toUpperCase() can take a
Locale. But they currently don't use it (but use the methods in Character
which don't take a Locale).

The getAvailableLocals() method in java.util.Local should be
getAvailableLocales() (see diff.3) I am also not sure that method really
does what it should do. But the docuementation is not clear on what it
should return since it is not clear what "installed locales" are.

For the other classes that implement getAvailableLocales() (or actually don't
implement it) wouldn't it be possible to package the locales in a separate
jar file and then always load the ResourceBundles through a URLClassLoader
(which we should then first implement :) using that jar so we can also search
which classes are available in the jar file?

At the moment all 'functionality' for each local is encoded in one big
gnu.java.locale.LocalInformation ListResourceBundle class. The Hacker's
Guide says that you should provide a Boolean for every functional area
that is supported for the Locale (which isn't done/used at this moment btw).
Wouldn't it be easier if there was a seperate class for all the different
functional areas? Something like:

gnu.locale.java.text.BreakIterator
gnu.locale.java.text.Collator
gnu.locale.java.text.DateFormat
gnu.locale.java.text.DecimalFormat
gnu.locale.java.util.Calender
gnu.locale.java.util.GregorianCalendar

There would then be much more classes. But I think it would make the
getAvailableLocales() methods easier/faster, gives a better overview of
what information is already localised and I think it would make automatic
generation of some of that information easier.
 (I guess there have been other projects that have Localisation support and
maybe Classpath could use that data.)

Just my two cents,

Mark
--- LocaleInformation_nl.old    Wed Dec 15 11:58:22 1999
+++ LocaleInformation_nl.java   Wed Dec 15 03:17:49 1999
@@ -148,7 +148,7 @@
 /**
   * This is the DateFormat.SHORT date format
   */
-private static final String shortDateFormat = "dd-mm-yy";
+private static final String shortDateFormat = "dd-MM-yy";
 
 /**
   * This is the DateFormat.MEDIUM format
--- LocaleInformation_de.java   1999/08/26 09:48:57     1.1
+++ LocaleInformation_de.java   1999/12/15 11:04:28
@@ -167,7 +167,7 @@
  * This is used by Calendar.
  * @see Calendar.getFirstDayInWeek
  */
-private static final Integer firstDayInWeek = new Integer(Calendar.MONDAY);
+private static final Integer firstDayOfWeek = new Integer(Calendar.MONDAY);
 /**
  * This is used by Calendar.
  * @see Calendar.getMinimalDaysInFirstWeek
@@ -208,7 +208,7 @@
   { "decimalSeparator", decimalSeparator },
   { "monetarySeparator", monetarySeparator },
   // For Calendar/GregorianCalendar
-  { "firstDayInWeek", firstDayInWeek },
+  { "firstDayOfWeek", firstDayOfWeek },
   { "minimalDaysInFirstWeek", minimalDaysInFirstWeek },
 };
--- LocaleInformation_en.java   1999/08/26 09:48:58     1.8
+++ LocaleInformation_en.java   1999/12/15 11:04:28
@@ -268,7 +268,7 @@
  * This is used by Calendar.
  * @see Calendar#getFirstDayInWeek()
  */
-private static final Integer firstDayInWeek = new Integer(Calendar.SUNDAY);
+private static final Integer firstDayOfWeek = new Integer(Calendar.SUNDAY);
 /**
  * This is used by Calendar.
  * @see Calendar#getMinimalDaysInFirstWeek()
@@ -342,7 +342,7 @@
   { "zeroDigit", zeroDigit },
   // For Calendar/GregorianCalendar
   { "calendarClass", calendarClass },
-  { "firstDayInWeek", firstDayInWeek },
+  { "firstDayOfWeek", firstDayOfWeek },
   { "minimalDaysInFirstWeek", minimalDaysInFirstWeek },
   { "gregorianCutOver", gregorianCutOver }
 };
--- LocaleInformation_nl.old    Wed Dec 15 11:58:22 1999
+++ LocaleInformation_nl.java   Wed Dec 15 03:17:49 1999
@@ -276,7 +276,7 @@
  * This is used by Calendar.
  * @see Calendar#getFirstDayInWeek()
  */
-private static final Integer firstDayInWeek = new Integer(Calendar.MONDAY);
+private static final Integer firstDayOfWeek = new Integer(Calendar.MONDAY);
 
 /**
  * This is used by Calendar.
@@ -353,7 +353,7 @@
   { "zeroDigit", zeroDigit },
   // For Calendar/GregorianCalendar
   { "calendarClass", calendarClass },
-  { "firstDayInWeek", firstDayInWeek },
+  { "firstDayOfWeek", firstDayOfWeek },
   { "minimalDaysInFirstWeek", minimalDaysInFirstWeek },
   { "gregorianCutOver", gregorianCutOver }
 };
--- Locale.java 1999/01/26 05:36:14     1.4
+++ Locale.java 1999/12/15 11:07:31
@@ -234,7 +234,7 @@
     /**
      * Returns the list of available locals.
      */
-    public static Locale[] getAvailableLocals() {
+    public static Locale[] getAvailableLocales() {
        return new Locale[] {
            ENGLISH, FRENCH, GERMAN, ITALIAN, JAPANESE, KOREAN, CHINESE, 
            UK, US, FRANCE, GERMANY, ITALY, JAPAN, KOREA, CHINA, 

Reply via email to