This is not a duplicate question, I have a very rare problem.

More than a year ago, the ISO currency code "Belarusian Ruble" changed. Previously it was "BYR", and now "BYN". Since then, there have been many updates to Magento, but the list of currencies and their codes has not changed.

Using the settings in the admin panel (System > Manage Currency > Symbols ), I can change the display of the currency ISO code at frontend, but inside in system it still wrong.

So I can not use payment solutions in my country, auto-renewal of exchange rates and many other things.

Please explain how to fix the wrong currency code in the Magento core?

Magento version CE


Magento completely depends on Zend framework for currencies. The files defining the currencies are located in lib/Zend/Locale/Data. Edit en.xml add your currency in currencies section:

    <currency type="BYN">
        <displayName>Belarusian Ruble</displayName>
        <displayName count="one">Belarusian Ruble</displayName>
        <displayName count="other">Belarusian Rubles</displayName>

Edit your locale xml file too, I believe it is be.xml? Then you can set your symbol in System > Manage Currency > Symbols.

But Beware: You're editing core files. It's a bad practice, but I don't know any way to overwrite Magento lib files somewhere else. With this approach, If you update your Magento version, these changes will lost.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.