Hire a web Developer and Designer to upgrade and boost your online presence with cutting edge Technologies

Sunday, June 23, 2013

Magento How to change Currency symbol ?

I had a hectic day changing the currency symbol in Magento. Though different blogs and magento forum helped me, I am writing this article for my reference. ;)
I had to change the currency symbol of Nepalese Rupee (from Nrs to Rs). By default, the currency symbol for Nepalese Rupee is Nrs.
For this, you need to edit lib/Zend/Locale/Data/en.xml
Well, the xml file to edit depends upon your locale settings. My locale is set to English (United States). So, I will have to change en.xml file.
You can change your locale setting from
Admin Panel –> System –> Configuration –> GENERAL –> General –> Locale options –> Locale
If your locale is Japanese (Japan), you need to change lib/Zend/Locale/Data/ja.xml
If your locale is Hindi (India), you need to change lib/Zend/Locale/Data/ne.xml
It’s similar for other locale settings. I have locale setting as English, so I will be editing en.xml file.
- Open lib/Zend/Locale/Data/en.xml
- Find the following :-
1
2
3
4
5
6
<currency type="NPR">
    <displayName>Nepalese Rupee</displayName>
    <displayName count="one">Nepalese rupee</displayName>
    <displayName count="other">Nepalese rupees</displayName>
    <symbol>Nrs</symbol>
</currency>
- Change
1
<symbol>Nrs</symbol>
to
1
<symbol>Rs</symbol>
- That’s it.
But wait, you are still not done. The most important thing is still left.
- Clear the Cache.
- Go to System –> Cache Management
- Refreh Cache.
- If you have not enabled the Cache OR if it didn’t work even after refreshing the cache, then
- delete the cache folder present inside var (var/cache)
Now, it should definitely work. :)
I changed the currency symbol for Nepalese Rupee. You can do similarly for your currency type.
Hope this helps. Thanks.
PS: Your changes will be gone when you upgrade Magento. You need to redo the above changes after upgrade.hanges after upgrade.

No comments:

Post a Comment