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

When we try to show a currency in a locale, the currency takes on=

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.1.1
    • Fix Version/s: None
    • Component/s: core-libs

      Description



      Name: sg39081 Date: 08/12/97

      =20
      Example 1:
          Display five German Marks in a Canadian Locale.=20

          This is formatted as $5.00 rather than DM5.00=20

      Example 2: Display five British Pounds in a French Locale.=20

          This is formatted as 5,00fr rather than 5,00=A3=20

      We would like to use the current feature's of a Locale such as:=20
          1. Thousands separation character=20
          2. Decimal point character=20
          3. Currency symbol position=20

      However, we need a way for the formatter to understand
      the currency type so that the proper symbol will display.=20

       e.g. double myCurrency =3D 5.00;
            tvFormatter =3D NumberFormat.getCurrencyInstance(myLocale);
            tvFormatter.format(myCurrency,Currency.USD);

                                  or

            Currency myCurrency =3D new Currency(5.00, Currency.USD);
            tvFormatter =3D NumberFormat.getCurrencyInstance(myLocale);
            tvFormatter.format(myCurrency);

                                   or

            USDollars myCurrency =3D new USDollars(5.00);
            tvFormatter =3D NumberFormat.getCurrencyInstance(myLocale);
            tvFormatter.format(myCurrency);
      company - Canada Trust , email - ###@###.###
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              aliusunw Alan Liu (Inactive)
              Reporter:
              sgoodsunw Sheri Good (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: