Locale is the class of java.util.*; package. This class represents the geographical, political and cultural region. Every tasks which requires to perform the operation is called local-sensitive. In this world, each places have it's own country name, language name etc. these can be determined by the object of the Locale class.
This section shows you how to list all the available locales installed with the software development kit. The given program in this section displays all the available language code, country code and full country name. Some following method and APIs which have used in the program for completion the task these are explained as follows:
Above method return a array of available locales which are installed with your software development kit.
Above method returns the two character 'language code' for the specific locale. You can display the full language name by using the getDisplayLanguage() method of the Locale class.
Above method returns the two character country code for the specific locale. If you want to display the full country name then you can use the getDisplayCountry() method of Locale class.
Above method display the full description about the created locale that means the specific geographical or political or the cultural region.
Here is the code of the program:
Posted on: April 16, 2007 If you enjoyed this post then why not add us on Google+? Add us to your Circles