2

When using English version of website, price is shown in Arabic number (common one). But when using Arabic version of website, price is shown in Hindi number.

I don't want price to be shown in Hindi Numbers.

English view of products (Arabic Numbers)

enter image description here

Arabic view of products (Hindi Numbers)

enter image description here How to force using Arabic Numbers in both versions.

1

Subscribe to the NumberFormatDefinitionEvent ("commerce_price.number_format") and change $definition['numbering_system'] to 'latn' for your locale.

2
  • Seems to be the solution, but I couldn't figure out how to do that, do I have to implement a hook in my custom module or theme.
    – Wisamx
    Jul 10 '18 at 14:22
  • You'll have to learn about event subscribers in general. Yes, they are implemented in modules. Jul 10 '18 at 22:17
0

I think your theme use this font, you must change font used in price, for test, use inspect element in chrome browser and change font and see result.

1
  • no, it's not in the theme. the characters translated in commerceguys/intl library.
    – Wisamx
    Jul 6 '18 at 7:25

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.