skip to main content
Gantt > Programmer's documentation > Advanced globalization > Software globalization in JViews > Locale and Ulocale classes
 
Locale and Ulocale classes
The JRE class java.util.Locale and the ICU class ULocale specify the locale of a user, that is, the preferences of a user that are related to globalization.
The class ULocale can be considered an extended and extensible counterpart of Locale:
*Locale contains only language, country, and a variant specification in undetermined syntax; ULocale also contains the script, calendar, collation, currency, and other possible detail specifications.
*A Locale object can be converted to a ULocale object by the method ULocale.forLocale.
*A ULocale object can be converted to a Locale object, and thus loses attributes such as script, calendar, collation, and so on, by the method ULocale.forLocale.
For more information about ULocale, see the user documentation and the reference documentation.
The class Locale provides sufficient support for the lookup of string translations or the formatting of numbers. For services that include calendar computations, date formatting, or sorting, pass a ULocale object to JViews. A Locale object does not contain the user’s preferences about these topics.

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.