This discussion is archived
4 Replies Latest reply: Sep 10, 2010 1:39 AM by 800025 RSS

Are Locale Standards published somewhere?

843810 Newbie
Currently Being Moderated
I am i18nizing my product but I need a list of supported locales along withe their locale data.

If I am doing something like this:

SimpleDateFormat sdf = (SimpleDateFormat)SimpleDateFormat.getDateTimeInstance(
SimpleDateFormat.SHORT, // date style
SimpleDateFormat.SHORT, // time style
locale); // locale object
Now I want to know what are the default DATE formats in all locales i.e. the out come if I will use this sdf to format my dates for different locales.
Java uses CLDR repository for getting locale data but that is only for few locales. Is there a published list for all locales and their locale data (i.e. what is the default date format, currency symbol etc.) or I have to write a program to list them?

Also is this information changes with versions/providers of Java (i.e. Java1.4 to Java6 OR Sun Java to IBM Java)? As I need to publish this list to my clients so I need a reliable source (some published document etc.) which I can trust rather than writing a program to list them all.


  • 1. Re: Are Locale Standards published somewhere?
    800025 Explorer
    Currently Being Moderated
    I'm not quite sure what exactly you are asking. But you may be interested in the following links (although you already mentioned CLDR):

    [The CLDR project|http://cldr.unicode.org/]

    ICU

    Hope this helps.
    Piet
  • 2. Re: Are Locale Standards published somewhere?
    843810 Newbie
    Currently Being Moderated
    Yes, I am also confused about what the OP is really asking.

    But as to the request about a "complete list of locales, with the default date formats, etc.": the most complete list is currently the CLDR, and that is also your best bet with respect to actual "locale standards". You need to understand, however, that almost no countries have official standards in this area. The locale formatting rules used by software are merely what most people in those locales consider correct.

    Major software companies (Microsoft, IBM, Sun, etc.) have traditionally used slightly different formatting rules for various locales (and there have been changes along the way, based on user feedback, much of it misguided), but they are gradually migrating to CLDR, which means that we will eventually get closer to agreement across platforms (Windows, Unix, etc.) and software products.
  • 3. Re: Are Locale Standards published somewhere?
    843810 Newbie
    Currently Being Moderated
    Here by official I mean the standards that Java follows as I read from its documentation that it follows CLDR rules only for few locales. (http://download.oracle.com/javase/6/docs/technotes/guides/intl/locale.doc.html - only those which are marked *)
    Then it seems that Java uses a mix of its own knowledge of locale data and CLDR and has not yet completely adopted CLDR repository for all locales.
    Then my questions are:
    1) Does Java publishes this knowledge somewhere?
    2) How can I get to know my JRE is using which version of CLDR? Is there any updater tool for it similar to timezone?
  • 4. Re: Are Locale Standards published somewhere?
    800025 Explorer
    Currently Being Moderated
    I cannot answer your questions, because I don't know.

    You might however consider the use of ICU4J, which is totally based on CLDR, so you have a reliable source of information. You will find it on the previous posted ICU link.

    Here a link to the [ICU4J API ref|http://icu-project.org/apiref/icu4j/]

    It has a VersionInfo class so you know what CLDR version is being used.