JDK-4778440 : Locale ID / resource bundle suffix for Hebrew should be "he" not "iw"
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.3.1,1.4.2
  • Priority: P3
  • Status: Resolved
  • Resolution: Won't Fix
  • OS: solaris_8,windows_2000
  • CPU: generic,x86
  • Submitted: 2002-11-13
  • Updated: 2021-03-08
  • Resolved: 2015-08-12
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Name: jl125535			Date: 11/13/2002


FULL PRODUCT VERSION :
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Classic VM (build 1.3.0, J2RE 1.3.0 IBM build cn130-20010609 (JIT enabled: jitc)
)

FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]

ADDITIONAL OPERATING SYSTEMS :




A DESCRIPTION OF THE PROBLEM :
Java is unable to load a resource bundle with suffix "he",
even though "he" is the correct ISO language code for
Hebrew. When we build and install localized resource files,
we use "he" for everything else (HTML, XML, C/C++), but
have to use "iw" for Java. It makes things unnecessarily
complicated.

I understand that you still need to recognize "iw" for
backwards compatibility, but the primary and default suffix
shoule be "he". Currently, "he" is remapped to "iw" when
creating the locale, this behavior should be reversed.

Currently, the string returned by the locale methods
is "iw" and we have to remap it to "he" when communicating
with users or interoperating with other environments. All
other programming and runtime environments use "he". Java
should also conform to the ISO standard and use "he" as the
primary suffix.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.Create a resource bundle with "he" suffix.
2.Create a locale with "he" as language.
3.Try to load the bundle. It will not load.
4. Do a locale.toString() on the locale and see that the
string has been remapped to "iw".

EXPECTED VERSUS ACTUAL BEHAVIOR :
(new Locale("he", "IL")).toString() returns "he_IL"
ResourceBundle.getBundle(new Locale("he", "IL")) will load
a resource bundle with "_he" suffix.

REPRODUCIBILITY :
This bug can be reproduced always.
(Review ID: 160172) 
======================================================================
###@###.### 11/5/04 00:51 GMT

Comments
This issue used to be a duplicate of Locale Enhancement in JDK7, but it wasn't fixed in that project for the compatibility reasons. As of JDK8, resource bundle names can be augmented by applications which implement Control.toBundleName(), so it is not simply possible to just replace the old ISO codes with new ones. That would break the compatibility in those applications. On the other hand, any application can implement their own Control.toBundleName() in which they can use those new ISO language codes in their resource bundle class/property names as a workaround.
12-08-2015

EVALUATION Will be fixed along with 6875847: Java Locale Enhancement.
17-08-2010

EVALUATION Retargeting this to Dolphin
02-06-2006

EVALUATION Changed the state to "cause known", as a result of backing out the fix (6385299).
10-03-2006

EVALUATION I agree that it wasn't the smartest idea to use the old ISO 639 language codes in 1997 when the new ones were introduced in 1995. However, this usage is clearly specified in the Locale class description, and existing applications rely on it. We need to see whether the specification can be changed in a way that maintains compatibility. ###@###.### 2002-11-13 Similar treatment is needed for the Norwegian language. ###@###.### 2005-05-10 17:44:21 GMT
13-11-2002