Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using a Locale when your not local ?



As has been mentioned, they need to be strings.

Currency symbols are the classic example of something that ought NOT to be localized, by the way. If something on your web site costs US$ 1.00, it still costs $1, even if your user happens to be viewing your site from outside the US, or has the locale on their machine set incorrectly. It doesn't suddenly cost $1 or #1 or whatever (assuming this list correctly sends the euro and pound currency symbols). It might cost 70p+VAT, but that's another matter - working out exchange rates and local taxation requirements is not something for the DecimalFormat class to decide :-)

-Rolf

I'm working on a demo for my java class.
I want to show the students the effects of localizing currency.

Having having $1.00 come up #1.00 when the program runs in England
seems straight forward.
Having it show # when in the good old USA has me confused.

import java.util.Locale;
import java.util.ResourceBundle;

Blah, blah

Locale localeGB = new Locale(en,GB);

IntelliJ complains

Cannot resolve symbols en & GB.

So I'm missing something...

any help appreciated

Gordon

--
Rolf Howarth, Square Box Systems Ltd, Stratford-upon-Avon UK.
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.