Java Cookbook
ulocale
Problem:
You want more options and power than provided by a core Java locale.
Solution:
ICU4J provides a locale class that provides significantly more capabilites than the Locale class in core Java. ULocale is the foundation of all internationalization classes in ICU4J.
ULocale is defined with at minimum a language code. It can also contain script name, region code, and other locale specific meta data such as calendar type.
To get an English ULocale:
Problem:
You want to use a Hebrew Calendar in your application.
Solution:
The Hebrew calendar is a very interesting lunar-solar calendar that poses some interesting challenges for the pogrammer. It uses a leap month to synch the lunar and solar components. The first day of the year can vary depending upon how it will affect jewish holidays, and the day ends at sundown.
If you are testing any of these recipes in Eclipse and the characters are not displaying correctly in your console visit http://i18ncookbook.com/eclipse_settings.
This site is ad supported. I hope you find something among our sponsors worth clicking. ;)
i18n search