Reputation: 10583
I have the following code for the Bulgarian currency 'lev';
try
{
$currency = new Zend_Currency("lev");
}
catch(Exception $e)
{
echo $e->getMessage();
die;
}
Which throws an exception
Currency 'lev' not found
How can I fix this, USD
and GBP
all work. Has this something to do with setting the correct Locale?
Upvotes: 4
Views: 164
Reputation: 10583
It would appear that BGN is the correct code, not LEV.
Detailed here as the ISO 4217 code.
http://en.wikipedia.org/wiki/Bulgarian_lev
Upvotes: 1
Reputation: 5731
I think you need to pass a locale to Zend_Currency, Try this.
$currency = new Zend_Currency('bg_BG');
Upvotes: 1