On the iPhone:
Using the US locale, a currency looks like this: $1,234.56 Using the UK locale, a currency looks like this: £1,234.56 Using the German (Germany) locale, a currency looks like this: 1.234,56 € and finally, a Japanese currency: ¥1,234
The Japanese currency has no decimals and this impacts my custom keyboard significantly. I’m trying to find a method in the Cocoa-touch framework which will tell me how many decimal places a specific currency has – my hard-coded value of 2 isn’t doing me justice 🙁
Can anyone help?
You should be able to use the CFNumberFormatter objects to get the information you need. Specifically you could use CFNumberFormatterGetDecimalInfoForCurrencyCode:
I hope that helps.