

For example, the code fr_CA (French-speaking Canada) is different from fr_FR (French-speaking France). These differences can be captured with different locale designators in which only the country code is different. However, precise usage and idiomatic expressions vary in the two countries. For example, French is used in both France and Canada. Country codes add precision to the language component of a locale. Locale uses the two-letter codes instead of the three-letter codes that this standard also defines.Ĭountry codes are an important locale component because objects for dates, time, numbers, and currency are particularly sensitive to this element. Table 3 shows a few of the defined codes.

In contrast to the language codes, country codes are set uppercase. It defines two- and three-letter abbreviations for each country or major region in the world.
#Java how to get greek letters iso
For this reason and others, language is not always sufficient to precisely define a locale.Ĭountry codes are defined by ISO 3166, another international standard. One of the differences in German from one country to another is sorting order. Several countries use German as an official first or even second language. For example, even though you may use de as the locale language code, de alone doesn't tell you anything about where German is spoken. Of course, language doesn't paint the entire picture of a locale. Your applications will use this information to provide a user interface that conforms to your customer's language. Language is an important component of a locale because it describes the language that a particular group of customers uses. For example, a object created for a German-speaking Swiss locale will format numbers differently than it would for a German-speaking Austrian locale. These three elements provide enough information to other locale-sensitive objects so that they can modify their behavior for a specific linguistic or cultural purpose. This notation separates each component of a locale with an underscore character: When writing or talking about locales, you can use a text abbreviation for a convenient representation.

Locales are critical to many culturally and linguistically sensitive data operations.Ī is a lightweight object that contains only a few important members: Locales affect user interface language, case mapping, collation (sorting), date and time formats, and number and currency formats. Locale-sensitive objects use objects to customize how they present and format data to the user. Collections.Locales identify a specific language and geographic region.Object Oriented Programming (OOPs) Concept in Java.Split() String method in Java with examples.Implementing our Own Hash Table with Separate Chaining in Java.Differences between HashMap and HashTable in Java.Differences between TreeMap, HashMap and LinkedHashMap in Java.Comparator Interface in Java with Examples.Collections.sort() in Java with Examples.Using underscore in Numeric Literals in Java.Currying Functions in Java with Examples.Using _ (underscore) as Variable Name in Java.ISRO CS Syllabus for Scientist/Engineer Exam.ISRO CS Original Papers and Official Keys.GATE CS Original Papers and Official Keys.
