0
votes

I was building my fashion store using using a purchased magento theme. After I finish everything, I noticed that the currency symbol position and pattern is wrong. These are what I have done before,

1.) Disabled all store views except Germany. 2.) Renamed "Madison Island" Store name to "Style Hive", 3.) Renamed store view "Germany" to "Sri Lanka".

----------My current Currency Setup--------------

Base Currency : Sri Lankan Rupee Default Display Currency : Sri Lankan Rupee

My website is : www.stylehive.lk

As an example the store shows a price of product as "5.568,00 Rs" But it should be "Rs 5,568.00"

Here is a example image.

Another example, Price shows as "520,00 Rs", but it should be "Rs 520.00"

I tried to change xml files in lib/zend/locale/data ....But it didn't worked. I changed the "de.xml" file. May be I have changed the wrong file. I am not sure.

Please help me to fix this issue.

2

2 Answers

0
votes

Go To vendor\magento\zendframework1\library\Zend\Locale\Data\en.xml

Find

 <currencyFormats numberSystem="latn">
         <currencyFormatLength>
            <currencyFormat type="standard">
                <pattern>¤#,##0.00</pattern>
            </currencyFormat>
            <currencyFormat type="accounting">
                <pattern>¤#,##0.00;(¤#,##0.00)</pattern>
            </currencyFormat>
        </currencyFormatLength>
        <unitPattern count="one">{0} {1}</unitPattern>
        <unitPattern count="other">{0} {1}</unitPattern>
    </currencyFormats>

Edit the standard pattern once.

Run command : php bin/magento cache:clean php bin/magento cache:flush php bin/magento setup:upgrade php bin/magento setup:di:compile

0
votes

Ok Finally I fixed it. After you fix,

lib/Zend/Locale/Data/language_file.xml

If it didn't work, Try

includes/src/data/de.xml

I changed includes/src/data/de.xml (Because I renamed german store view)

<currencyFormat type="standard">
    <pattern>#,##0.00 ¤</pattern>
</currencyFormat>

to

<currencyFormat type="standard">
    <pattern>¤ #,##0.00</pattern>
</currencyFormat>

---------------and------------------

<decimal>,</decimal>
<group>.</group>

to

<decimal>.</decimal>
<group>,</group>