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

(rb) RFE:ResourceBundle should allow developers to define their own search strategies

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 5.0, 6
    • core-libs
    • b38
    • generic, x86, sparc
    • generic, linux_redhat_7.2, solaris_8, windows_nt, windows_2000, windows_xp

      ResourceBundle currently searches for classes/property files using a hard-coded, static algorithm based on the name of the ResourceBundle and the appropriate Locale. It searches for bundles by concatenating various permutations of the Locale identifier to the classname.

      Some developers would like the ability to define their own search strategies. For example, they would like to search for bundles in different packages, using the same bundle name. For example, getBundle("MyBundle", Locale.US) might look for this class in the following way:
      1. search for packageA.res.en_US.MyBundle
      2. then packageA.res.en.MyBundle
      3. packageA.res.<default locale>.MyBundle
      4. etc.
      3. then packageA.res.MyBundle

      Or perhaps they would like the bundles to exist in a database structure of some kind.

            okutsu Masayoshi Okutsu
            joconnersunw John Oconner (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: