format currency for specific local in obj c

310 Views Asked by At

i am getting product price in multiple currency. here is a sample data

CurrencyName CurrencySymbol Pirce
"USD", "$" 1234.5
"EUR", "€" 12340.5
"GBP", "£" 123.4
"CHF", "CHF" 12345.0

so i want to format available currency based on type not based iPad/iPhone local format. for example
$1234.50
1.234,50€
and also i want to display all at a same time.
thanks.

1

There are 1 best solutions below

3
On BEST ANSWER

That means you want to show it in different localizations. Like the Euros in French or German (with decimal comma) and the CHF in Swiss (with decimal point and probably and apostrophe for separating the thousands).

I would map the currency to a specific localization and the feed it to the nsnumberformatter.