Magento: Decimal Price in spanish language display Dot instead comma

ぃ、小莉子 提交于 2019-12-10 09:26:32

问题


i have multilanguage store. default language is english. there are few products have decimal price.

when i switch languge to spanish the comma appears instead dot in decimal price.

for example: price: 1.35$ in english when i switch language to spanish the price will look like Price: 1,35$

i really wanna remove this , need . how to do that.?


回答1:


You could try to change the local settings. So go to your magento directory and open the file lib/Zend/Locale/Data/en.xml (replace en.xml by the language file for which you would like to perform your changes).

Search for

<numbers>
    <symbols>
        <decimal>.</decimal>
        <group>,</group>

Clear the cache, also for safer side please try to do this first on your test installation to avoid issues.




回答2:


You can change your locale setting

here is example for English. For that you have to do Minor changes in your Language File. >Following is the Directory Structure of File.

=> root/lib/Zend/Locale/Data/en.xml (For English Language) => around line 2611 you can see following code.

> <currencyFormat>
>      <pattern>¤#,##0.00;(¤#,##0.00)</pattern>
> </currencyFormat>

=> Now Change above code with Following code.

>  <currencyFormat>
>       <pattern>#,##0.00 ¤;(#,##0.00 ¤)</pattern>
> </currencyFormat>

you can set it to for Dutch.

To fix the comma form 1.000 to 1,000

add to the past post the following :

go to: => root/lib/Zend/Locale/Data/XX.xml (XX.xml For your Language) for example : => root/lib/Zend/Locale/Data/en.xml (For English Language)

around line 2286 you can see following code :

<numbers>
    <defaultNumberingSystem> xxx your Language xxx </defaultNumberingSystem>
    <symbols>
        <decimal>,</decimal>
        <group>.</group>

to :

<numbers>
    <defaultNumberingSystem> xxx your Language xxx </defaultNumberingSystem>
    <symbols>
        <decimal>.</decimal>
        <group>,</group>

this wil change the comma form 1.000 to 1,000

thanks & regards

Bahattab



来源:https://stackoverflow.com/questions/19270992/magento-decimal-price-in-spanish-language-display-dot-instead-comma

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!