Get Currency Symbol based on Country code or Country name using NSLocale

前端 未结 4 679
野性不改
野性不改 2020-12-16 08:11

I want to display Currency Symbol based on Country name or country code using NSLocale I have all the country name list. suppose I have selected USA then it

4条回答
  •  一向
    一向 (楼主)
    2020-12-16 09:07

    You can't do that with the currency symbol alone. You have to let the system format your numbers as a currency with the correct locale.

    For example, there are over a dozen countries using Euros, and they display money in different ways. And the currency symbol for the USA is only "$" if you are in the USA - in Canada, for example, it is "US$" because Canadians use "$" for their own currency.

提交回复
热议问题