Yii Framework provides a simple way to find the currency symbol for any given currency code (USD/EUR/JPY...), for example:
Yii::app()->locale->getCurrencySymbol('USD');
But how do we find the currency code which corresponds to the locale in use?
Yii Framework provides a simple way to find the currency symbol for any given currency code (USD/EUR/JPY...), for example:
Yii::app()->locale->getCurrencySymbol('USD');
But how do we find the currency code which corresponds to the locale in use?
There is no relation set in Yii between the locales and currency symbols. You need to do your own mapping if you need such relation.