在Symfony Intl包中,存在一个获取所有货币列表的方法。有什么方法可以得到一个国家和这个国家使用的货币之间的映射吗?
。我想获得塞尔维亚使用的货币列表。
代码:
echo (new NumberFormatter(
Zend_Locale::getLocaleToTerritory('RS'),
NumberFormatter::CURRENCY
))->getTextAttribute(NumberFormatter::CURRENCY_CODE);
输出:RSD
如您所见,我使用了Zend Locale。
塞尔维亚的问候。:)