On Dec 16, Mark Wielaard wrote:
> On Thu, Dec 16, 1999 at 11:17:46AM +0100, Jochen Hoenicke wrote:
> > [about getAvailableLocals...]
> > I suggest adding an entry to the root resource bundle, listing the
> > available locales.
>
> Would it be an idea to supply a simple properties file (say gnu.locales)
> with that information? That would make it simpler for people that want to add
> their own Locales. By providing an extra properties file (with the same name)
> and their LocaleInformation classes in a directory/zip/jar which people can
> just add to their classpath (you can then merge those property files by
> doing a ClassLoader.getResources("gnu.locales")).
This sounds like a good idea, but it needs some infrastructure. The
format of gnu.locales could be the same as for Properties:
gnu/java/locale/DateFormat=en,nl,de_DE,de_AT,ja
gnu/java/locale/Calendar=en,nl,de
(I assume the LocaleInformation is already splitted up)
We could create a gnu/java/locale/AvailableLocale.java which does the
gnu.locales merging. The usage could be:
public static Locale[] getAvailableLocales() {
AvailableLocale.getAvailableLocales("gnu/java/locale/Calendar");
}
It may be worthwhile to generalize this interface so that non
classpath classes could use it, too. What do you think?
Jochen