Is it possible to get an ISO 4217 currency code from Angular or JavaScript?

无人久伴 提交于 2019-12-11 18:47:54

问题


is there any way to get the ISO 4217 currency code for a locale? I'm using Angular. They have a utility function getLocaleCurrencyName() to retrieve the name like euro, US dollar etc. but not the currency code like EUR, USD etc. Any idea?


回答1:


Try getLocalCurrencySymbol(): https://pr18487-aedf0aa.ngbuilds.io/api/common/getLocaleCurrencySymbol

Note that '$' is not a currency code, it is a currency symbol. USD, CAD, AUD are a few currency codes for currencies that have the symbol '$'.



来源:https://stackoverflow.com/questions/48380213/is-it-possible-to-get-an-iso-4217-currency-code-from-angular-or-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!