Localize Currency for iPhone
Posted
by Meltemi
on Stack Overflow
See other posts from Stack Overflow
or by Meltemi
Published on 2009-05-13T04:07:57Z
Indexed on
2010/04/27
17:43 UTC
Read the original article
Hit count: 517
I would like my iPhone app to allow the input, display and storage of currency amounts using the appropriate symbol ($, €, £, ¥, etc) for the user.
Would NSNumberFormatter do everything I need? What happens when a user switches their locale and these amounts (dollars, yen, etc.) are stored as NSDecimalNumbers. I assume, to be safe, it's necessary to somehow capture the locale at the time of entry and then the currency symbol and store them in my instance along with the NSDecimalNumber ivar so they can be unwrapped and displayed appropriately down the road should the user changed their locale since the time when the item was created?
Sorry, I have little localization experience so hoping for a couple quick pointers before diving in. Lastly, any insight on how to you handle this kind of input given the limitations of the iPhone's keyboards?
© Stack Overflow or respective owner