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

Unable to get values for customised system locale

    XMLWordPrintable

Details

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

    Description

      A DESCRIPTION OF THE REQUEST :
      Windows XP, MacOS X and other operating systems allow a user to select a locale and the customise the locale's attributes. For example, a user might decide their locale is US English, but they want 24 hour time format.

      If I write an AWT or Swing based application, I would like to present localised data in the format that the user selected at system level. After discussing with other people in the forums and some experimentation, there does not seem to be any support for this in JDK 1.5 or 1.6.

      I would expect the 'default' locale to return whatever the user selected at the system level.

      JUSTIFICATION :
      If I write an AWT or Swing based application, I would like to present localised data in the format that the user selected at system level. The user is likely to blame the application for getting this wrong, even if it is a limitation of the API.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Default or a 'special' locale returns the locale the user customised at the system level.
      ACTUAL -
      Returns a static locale. If the base locale is US, then the settings for US are returned, ignoring the user customisations.

      CUSTOMER SUBMITTED WORKAROUND :
      The only workaround would be to use a JNI interface, but this would mean requiring writing native code for multiple platforms.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: