Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: How to get the overridden currency symbol from the Windows?

  1. #1
    Junior Member
    Join Date
    Jan 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to get the overridden currency symbol from the Windows?

    How in Java to get the current(overridden) currency symbol from the Windows?
    As you know t is possible in Windows (Control Panel->Region->Additional Settings->Currency) change currency symbol to the new one.
    For example default is '$' and customer change it to the '€'
    And programs (Excel for example) use this new currency symbol, i.e instead of $100 you see €100.

    I need emulate similar behavior in Java.


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: How to get the overridden currency symbol from the Windows?

    Look at Utils.getCurrencySymbol() and see if that works for you.

    Or maybe:

    NumberFormat.getCurrencyInstance().getCurrency().g etSymbol()

    I don't know what these will do in Windows 7. Maybe you'll let us know.

  3. #3
    Junior Member
    Join Date
    Jan 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How to get the overridden currency symbol from the Windows?

    Quote Originally Posted by GregBrannon View Post
    Look at Utils.getCurrencySymbol() and see if that works for you.

    Or maybe:

    NumberFormat.getCurrencyInstance().getCurrency().g etSymbol()

    I don't know what these will do in Windows 7. Maybe you'll let us know.
    This will work for DEFAULT case, and I really need to handle a case when currency symbol overridden as I mention above.

Similar Threads

  1. Replies: 1
    Last Post: June 23rd, 2013, 02:37 AM
  2. question about currency symbol
    By darking123 in forum Java Theory & Questions
    Replies: 0
    Last Post: November 18th, 2012, 03:30 AM
  3. Handling exception in overridden class
    By Arati2512 in forum Exceptions
    Replies: 3
    Last Post: May 1st, 2012, 11:47 AM
  4. Replies: 0
    Last Post: February 20th, 2012, 02:04 PM
  5. Setting what currency i want with getCurrencyInstance()
    By djl1990 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 30th, 2011, 08:54 PM