Java 10 – Locale Enhancements

  • Post author:
  • Post category:Java 10
  • Post comments:1 Comment
Java 10 - Locale Enhancements

This topic is about Java 10 – Locale Enhancements.

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

In this topic we learned about Java 10 – Locale Enhancements. To learn more, Click Here.

This Post Has One Comment

Leave a Reply