Hi, how do I display local currency symbols in Ionic v3? I want US users should see prices with $ sign, UK users should see the pound sign, Japanese users the Yen symbol, etc. How can I achieve that?
I tried {{ amount | currency }} with amount=200, but it showed USD200 instead of $200. I want it to show the user’s local currency symbol.
I’ve searched all over Google, but no luck. I even checked the cordova globalization plugin, but it looks like you have to know the currency code (USD) to display the symbol.
Thanks, but it didn’t help much. It shows how to format the currency, but I need something to detect the user’s location, and based on that, format to the right currency. I may just end up reading from a JSON list of all countries & currencies.
I ended up adding a JSON file containing currency codes & symbols, then selecting the right symbol based on the user’s country (which they entered manually). Here’s a sample of the file (for US dollar)