In the Symfony Intl bundle, there exists a method to get the list of all currencies. Is there any way to get the mapping between a country and the currencies used in this country?
e.g. I want to get the list of currencies used in Serbia.
In the Symfony Intl bundle, there exists a method to get the list of all currencies. Is there any way to get the mapping between a country and the currencies used in this country?
e.g. I want to get the list of currencies used in Serbia.
Code:
echo (new NumberFormatter(
Zend_Locale::getLocaleToTerritory('RS'),
NumberFormatter::CURRENCY
))->getTextAttribute(NumberFormatter::CURRENCY_CODE);
Output:
RSD
As you can see, I used Zend Locale.
Greetings from Serbia. :)