get local based on currency

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

get local based on currency

sempf
Hi!

I’ve got a DB with a lot of prices in different currencies (three-letters e.g. USD, EUR, AUD, …). I would like to instantiate a Zend_Currency object based on the currency code in the DB. I tried

$currency = new Zend_Currency(array( 'currency' => 'AUD' ));

But this doesn’t work, because my current locale is de_DE and there is no currency data for AUD in de_DE. Is it somehow possible to set the locale for the Zend_Currency object based on the currency code?

Thanks,
sempf