<i18n dev> Java Locale enhancement proposal
Yoshito Umaoka
y.umaoka at gmail.com
Thu Jul 24 10:41:55 PDT 2008
Dear OpenJDK i18n dev mailing list subscribers,
I'm a software developer working for ICU project (http://icu-project.org).
We feel the current JDK Locale is out of date and needs some enhancements.
We had some discussions including the original author of JDK Locale class
and wrote a proposal below -
http://docs.google.com/Doc?id=d3q3z35_14c2hhxmdw
We would like to bring this proposal to the OpenJDK i18n community
to continue the discussion for future improvements of JDK.
Locale was introduced in JDK 1.1 as a core i18n class in Java i18n APIs.
The original design was derived from RFC1766 Tags for the Identification of
Languages. The language tag specification had revised several times and the
latest version is RFC4646, which is a part of the best current practice
(BCP)
0047 with RFC4647.
When Locale was introduced in JDK, it was reasonably sufficient to represent
language tags practically used in various implementations. For example,
J2EE
a Servlet API parses HTTP accept-language field into Locale objects.
However, this is no longer true, because some enhancements done in the
language tag specification cannot be mapped to Locale. These enhancements
are -
- ISO639 part 2/3 three letter language codes in language subtag
- UN M.49 numeric region codes in region subtag
- Nwe script subtag using ISO15924 script codes
BCP47 language tag specification is also used by CLDR (Common Locale
Data Repository) project hosted by Unicode consortium. CLDR is the most
comprehensive repository of locale data and used by various software
including JDK. The locale identifier used by CLDR - Unicode locale
identifier - is based on BCP47 and the specification defines the mapping.
At this moment, JDK does not fully utilize the locale data from CLDR, but
we believe importing the locale data from CLDR into JDK will benefit
both JDK development and Java users.
Yoshito Umaoka (ICU Project)
More information about the i18n-dev
mailing list