JDK-4486664 : RFE: ResourceBundle should fall back from zh_HK to zh_TW instead of to zh
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: solaris_9,1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_8
  • CPU: generic,sparc
  • Submitted: 2001-08-01
  • Updated: 2004-05-25
  • Resolved: 2004-05-19
Related Reports
Duplicate :  
Duplicate :  
Description
Need to fallback all java applications to zh_TW for zh_HK.UTF-8 locales instead
of zh.

java full version "1.4.0-beta_refresh-b67c"

###@###.### 2001-07-31

The same as zh_HK.BIG5HK, we need to use zh_TW messages for all Java applications in both zh_HK.BIG5HK and zh_HK.UTF-8.

Currently we have no plan to provide another set of Hong Kong specific messages because of the following reasons:

1. zh_HK.* are traditional Chinese locales, not zh which is Simplified Chinese. We are sharing almost all of the other OS message files between zh_TW.BIG5 and zh_HK.BIG5HK, between zh_TW.UTF-8 and zh_HK.UTF-8, there are very few chances to have HKSCS specific messages.
2. A new set of Java message files/packages will occupy more CD spaces and Disk Spaces and need much more engineering and testing efforts.
3. we can provide zh_HK specific files/directories if there do have HongKong specific message files in the future.

So, would you please change the JDK to try zh_HK directory, *_zh_HK.class and font.properties.zh_HK* first and if no zh_HK is found, fallback to zh_TW, *_zh_TW.class?

Comments
EVALUATION The fallback strategy between locales is defined in java.util.ResourceBundle and is well-known among Java developers. Changing it would create the possibility of compatibility problems, so we can't do it at this point. We're planning to make the strategies used by ResourceBundle more configurable in a future feature release (see, e.g., 4303146). In the meantime, application developers should avoid using "zh" resource bundles, and instead use complete locale IDs for Chinese localizations. The J2RE, for example, provides zh_CN and zh_TW localizations, while zh_HK and zh_SG (and other zh_* locales) fall back to English. If Chinese localization for these locales is required for a product, and falling back to zh_TW or zh_CN is considered sufficient, then simple Java resource bundles can be implemented that implement the desired fallback strategy: import java.util.ListResourceBundle; import java.util.Locale; import java.util.ResourceBundle; public class MyBundle_zh_HK extends ListResourceBundle { public MyBundle_zh_HK() { ResourceBundle bundle = ResourceBundle.getBundle("MyBundle", Locale.TAIWAN); setParent(bundle); } public Object[][] getContents() { Object[][] contents = {}; return contents; } } norbert.lindenberg@Eng 2001-07-31 We will consider this issue as part of our plan to make ResourceBundle more flexible and configurable; see 4303146. norbert.lindenberg@Eng 2001-08-01 Closing this bug report as a duplicate of 4303146. ###@###.### 2004-05-19
01-08-2001