- Java I18N - Discussion
- Java I18N - Useful Resources
- Java I18N - Quick Guide
- JAVA I18N - From Reader and To Writer Conversion
- JAVA I18N - From and To String Conversion
- JAVA I18N - UTC
- JAVA I18N - Date Format Patterns
- JAVA I18N - DateFormatSymbols Class
- JAVA I18N - Formatting Date
- JAVA I18N - SimpleDateFormat Class
- JAVA I18N - Formatting Date and Time
- JAVA I18N - Formatting Time
- JAVA I18N - Formatting Dates
- JAVA I18N - DateFormat Class
- JAVA I18N - Grouping Digits
- JAVA I18N - DecimalFormatSymbols Class
- JAVA I18N - Locale Specific DecimalFormat
- JAVA I18N - Formatting Patterns
- JAVA I18N - DecimalFormat Class
- JAVA I18N - Parsing Numbers
- JAVA I18N - Set Rounding Mode
- JAVA I18N - Set Min/Max Precision
- JAVA I18N - Format Percentages
- JAVA I18N - Format Currencies
- JAVA I18N - NumberFormat Class
- JAVA I18N - ResourceBundle Class
- JAVA I18N - Display Language
- JAVA I18N - Locale Details
- JAVA I18N - Locale Class
- JAVA I18N - Environment Setup
- JAVA I18N - Overview
- JAVA I18N - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Java Internapzation - Locale Class
A Locale class object represents a specific geographical/poptical/cultural region. Any operation requiring a Locale to perform its task is called locale-sensitive operation and uses the Locale to master information relative to the user. For example, displaying a number is a locale-sensitive operation. The number should be formatted as per the customs and conventions of the user s native country, region, or culture.
Locale Contents
A Locale object contains the following:
Language - ISO 639 alpha-2 or alpha-3 language code, or registered language subtags up to 8 alpha letters. alpha-2 code must be used if both alpha-2 and alpha-3 code are present. The language field is case insensitive, but Locale always canonicapzes to lower case.
Script - ISO 15924 alpha-4 script code. The script field is case insensitive, but Locale always canonicapzes to title case.
Country (region) - ISO 3166 alpha-2 country code or UN M.49 numeric-3 area code. The country field is case insensitive, but Locale always canonicapzes to upper case.
Variant - Any arbitrary value used to indicate a variation of a Locale. Where there are two or more variant values each indicating its own semantics, these values should be ordered by importance, with most important first, separated by underscore( _ ). The variant field is case sensitive.
Extensions - A map from single character keys to string values, indicating extensions apart from language identification. The extensions in Locale implement the semantics and syntax of BCP 47 extension subtags and private use subtags. The extensions are case insensitive, but Locale canonicapzes all extension keys and values to lower case.