Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6506167

Adding ResourceBundle Support for Internationalization

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 6
    • core-libs

      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 ----------

            naoto Naoto Sato
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: