Magento Currency Symbol Position – Euro for English Language

currencylocale

I am using Magento v1.9.1.0. and I have a problem with currency symbol position when having locale set to English and currency to Euro. It displays:

€24.10

I would like to show it like where locale is set to Slovenian and currency to Euro:

24.10 €

If I change 'lib/Zend/Locale/Data/en.xml' currency format, then it won't display like it should for US dollars currency symbol($).

Does anyone know the solution for that kind of problem?

Best Answer

You can observe currency_display_options_forming event dispatched in Mage_Core_Model_Locale class

<currency_display_options_forming>
    <observers>
        <foo_bar>
            <class>foo_bar/observer</class>
            <method>currencyDisplayOptionsForming</method>
        </foo_bar>
    </observers>
</currency_display_options_forming>

Observer:

class Foo_Bar_Model_Observer
{
    public function currencyDisplayOptionsForming(Varien_Event_Observer $observer)
    {
        if (Mage::app()->getLocale()->getLocaleCode() == 'en_US' &&
            Mage::app()->getStore()->getCurrentCurrency()->getCode() == 'EUR'
        ) {
            $options = $observer->getEvent()->getCurrencyOptions();
            $options['position'] = Zend_Currency::RIGHT;
        }

        return $this;
    }
}

Look in Zend_Currency class for additional options.

Related Topic