1

I created two stores - one for en_US other is Arabic that is ar_KW for Kuwait

When i switched the store from English to Arabic, my price decimal symbol changed from "." to ",". But, in my en_US store it shows "." only. How to fix this issue ?

Note :- In vendor\magento\framework\Locale\Format.php I changed . to some other symbol but it reflected only in Product Detail page and order summery block. In rest of them, the price symbol is still ,. How to fix this issue in one change ?

1

In vendor\magento\zendframework1\library\Zend\Locale\Data\ar.xml change :

<symbols numberSystem="arab">
    <decimal>,</decimal>

to

<symbols numberSystem="arab">
    <decimal>.</decimal>

In php ode level it happens in vendor \magento\zendframework1\library\Zend\Locale\Data.php in getList() method.

you can see switch statement there and you can do the changes in case 'symbols':

But, make sure cache is cleared before testing (in local system some times cache will lead to the changes not getting reflected properly)

  • 4
    Is there anyway to override and not change directly the \magento\zendframework1\library\Zend\Locale\Data\xx.xml ? – Ervin Aug 3 '16 at 9:30
  • Did you get any solution to overide this file the directly than editing in core file – Vindhuja Jun 10 '19 at 10:18
1

In your /vendor/magento/zendframework1/library/Zend/Locale/Data/ path in ar_KW.xml file make chages as below: add below code in your locale's xml file :

<ldml>
...........
<numbers>
    <symbols numberSystem="latn">
        <decimal>.</decimal>
        <group>,</group>
        <list>;</list>
        <percentSign>%</percentSign>
        <plusSign>+</plusSign>
        <minusSign>-</minusSign>
        <exponential>E</exponential>
        <superscriptingExponent>×</superscriptingExponent>
        <perMille>‰</perMille>
        <infinity>∞</infinity>
        <nan>NaN</nan>
    </symbols>
</numbers>
.................
</ldml>

Run command : php bin/magento cache:flush

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.