Dot Net and Java codes

I have been tasked with the tremendous job of creating a reference table for our application culture information. The columns I need to generate the data are as follows:

  • Dot network code
  • Version
  • Culture name
  • The name of the country
  • Language name
  • Java country code
  • Java language code
  • Country code Iso
  • Iso language code

I found the globalization namespace, but I'm sure someone there asked the same question or there is already a table.

Thanks for any help

+1


source to share


4 answers


Java uses 2-letter ISO country and language codes. I recommend getting rid of the Java Code and Java Language Code fields in your lookup table as they will be redundant.

I am assuming that wherever you get your ISO country and language , you will find their corresponding names in English. However, the Java Locale API will give you localized names for country and language as well, if you need them. (That is, what is called America in Japan?)

For example, you can do this:

Locale l = Locale.ITALY;
System.out.println(l.getDisplayCountry() + ": " + l.getDisplayLanguage());
System.out.println(l.getDisplayCountry(l) + ": " + l.getDisplayLanguage(l));

      



Which, running in English version of English, prints:

Italy: Italian 
Italia: italiano

      

Note that you can get 3-letter ISO codes from the Locale class, but be sure to use only 2-letter codes when creating them.

+2


source


It's weird that the last time I visited this page, someone beat me by posting links to Java links for localization.

However, since their message went away, this is what I wrote before they beat me up.



Java uses two ISO standards for localization with java, util.Locale .

+2


source


Java uses Locales to store this information. More information about it can be found on the Sun Internationalization page . Java uses a syntax similar to the "en-us" syntax, but instead of using a hyphen, it strips out the underscore.

0


source


I'm assuming you mean localization or internationalization or i18n.

Try this tutorial:
    http://java.sun.com/docs/books/tutorial/i18n/index.html

Good luck Randy Stigbauer

0


source







All Articles