Java 10 Locale Enhancements: Expanded Unicode Extensions and Updated APIs
JEP 314 - Unicode Language-Tag Extensions
Java 7 introduced support for BCP 47 Language tags. But this unicode locale extensions was limited to calendar and numbers. With Java 10, java.util.Locale and related classes are updated to implement additional unicode extensions as specified in LDML specification. Following additional extensions are added.
cu − Currency Types
fw − First Day of a Week
rg − Region Override
tz − Time Zone
Following APIs are updated.
java.text.DateFormat::get*Instance
java.text.DateFormatSymbols::getInstance
java.text.DecimalFormatSymbols::getInstance
java.text.NumberFormat::get*Instance
java.time.format.DateTimeFormatter::localizedBy
java.time.format.DateTimeFormatterBuilder::getLocalizedDateTimePattern
java.time.format.DecimalStyle::of
java.time.temporal.WeekFields::of
java.util.Calendar::{getFirstDayOfWeek,getMinimalDaysInWeek}
java.util.Currency::getInstance
java.util.Locale::getDisplayName
java.util.spi.LocaleNameProvider
Java
- Master Java Operators: Types, Syntax, & Practical Examples
- Java Comments: Types, Usage, and Best Practices
- Mastering Java if…else: Control Flow Explained
- Mastering the Java Enhanced For Loop: Syntax, Examples, and Best Practices
- Java Break Statement: How, When, and Labeled Breaks Explained
- Mastering Java's super Keyword: Advanced Usage & Practical Examples
- Mastering Java Interfaces: Concepts, Implementation, and Best Practices
- Mastering Java Try‑with‑Resources: Automatic Resource Management Explained
- Java Annotations Explained: Types, Placement, and Practical Examples
- Java 10 Locale Enhancements: Expanded Unicode Extensions and Updated APIs