JDK-6506167 : Adding ResourceBundle Support for Internationalization
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 6
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2006-12-19
  • Updated: 2011-02-16
  • Resolved: 2009-06-10
Related Reports
Duplicate :  
Description
A DESCRIPTION OF THE REQUEST :
Because our language is not latin based like English all of our programs are designed and developed to support more than one language. For example we support English, Bulgarian, German, French, Italian, Spanish, Russian and other languages.
Having in mind our experience we would like to offer our solutions to be included as part of JDK7 or next release of JDK6.

JUSTIFICATION :
Now the Internationalization is very difficult process. With the proposed feature the Internationalization will be very easy to be made manually and with IDE like NetBeans 6 which we currently use.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
As summary for the solution I can say that the idea is:
1. In java.awt.Component to be added the following methods:
    String getResourceString(String key, String defaultValue);
    Object getResourceValue(String key, Object defaultValue);
    ResourceBundle getResourceBundle()
2. In NetBeans 6.x or/and 5.x to be added the following feature to the Resource Editor:
   getResourceString("{key}", "{value}")

The key moment in our proposal is the combination of
getResourceString(String key, String defaultValue),
getResourceString("{key}", "{value}") in NetBeans IDE
and
ResourceBundle getResourceBundle()

In contrast to standard getResourceBundle() this getResourceBundle() which will be in java.awt.Component the default encoding will be UTF-8 instead ASCII. Also the order of searching Resources in case that the ResourceBundle is not set will be:
1. The current Class name + ".properties" extension: SomeClass.properties;
2. The current package + name "package" + ".properties": "com.cosmos.apps.someapp.package.properties"
3. this and the next order will be like the above point for the package with removing the last package name.

---------- BEGIN SOURCE ----------
I can offer the whole working solution for the idea.
---------- END SOURCE ----------

Comments
EVALUATION Resource loading beyond the existing packages are now targeted in the JSR 277 (), also the request to support the properties resource bundle in non-ISO8859-1 encoding are already filed as 6478837.
03-07-2007