Internationalization Enhancements in JDK 8

The Internationalization enhancements for JDK 8 include the following:

Unicode Enhancements

The JDK 8 release includes support for Unicode 6.2.0. Since the release of JDK 7, which supported Unicode 6.0, the Unicode 6.1.0 and 6.2.0 specs introduced the following new features that are now included in JDK 8:

The Java Tutorial has a section that discusses Unicode.

Adoption of Unicode CLDR Data and the java.locale.providers System Property

The Unicode Consortium has released the Common Locale Data Repository (CLDR) project to "support the world's languages, with the largest and most extensive standard repository of locale data available." The CLDR is becoming the de-facto standard for locale data.

The CLDR's XML-based locale data has been incorporated into the JDK 8 release, however it is disabled by default.

There are now four distinct sources for locale data:

To select the desired locale data source, use the java.locale.providers system property, listing the data sources in the preferred order. For example:

java.locale.providers=HOST,SPI,CLDR,JRE

The default behavior is equivalent to the following setting:

java.locale.providers=JRE,SPI

For further information, see the API specification page for java.util.spi.LocaleServiceProvider and the "JDK 8 and JRE 8 Supported Locales" page, which becomes available after the release of Oracle JDK 8.

New Calendar and Locale APIs

As the Unicode Common Locale Data Repository (CLDR) project continues to evolve, the Java SE API is updated. The JDK 8 release includes two new classes, several new methods, and a new return value for an existing static method:

Ability to Install a Custom Resource Bundle as an Extension

JDK 8 introduces the java.util.spi.ResourceBundleControlProvider interface, which is a service provider interface (SPI). SPIs enable you to create extensible applications, which are those that you can extend easily without modifying their original code base. This SPI enables you to change how the method ResourceBundle getBundle(String baseName, Locale targetLocale) loads resource bundles. Note that this method does not require an instance of the ResourceBundle.Control class. An installed implementation of the ResourceBundleControlProvider SPI replaces the default ResourceBundle.Control class, which defines the default bundle loading process. See Installing a Custom Resource Bundle as an Extension for more information.


Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.