Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
See screenshots. If I enable second language "kr." moved in front of the price.
Screenshots
Additionnal information
PrestaShop version: 1.7.6 & develop
PHP version: 7.2
Hi @MathiasReker,
I tried o import the Denmark pack, In the FO, when English is selected & DKK kr is selected.
I have this:
What is the exact Language/country did you used during the install?
Thanks!
@khouloudbelguith Exacly! Thats the problem. The second language displayed wrong. Danish should be like this format: 1.000,00 kr.
If you install only 1 language then there are no problem. The problem exist from language 2+
@MathiasReker, thanks for these clarifications.
We will check & feedback.
It's not a bug, when you're running in english, it takes the english currency format, not the danish one.
This mean if you have $10.00
and you switch to danish currency, it takes the english CLDR currency, and use the danish currency symbol => kr10.00
Same if you're in french, you have 25,61 €
and if you switch to USD you have 28,72 $
because it's the French currency format :)
@PierreRambaud The price is: 23,90 kr.
and my languege is danish. Then I want to translate my website to english and still show the price in kr.
. Then it will look like this: kr.23.90
This is what I said, if you're in english, you must display currencies in english format :thinking:
But what if I want to show everything in kr.
(DKK)?
If you try to display with Euros with English language you will see that the € symbol is before the number:
So this is the expected behavior of the CLDR, if you want more details you can check the english CLDR data in localization/CLDR/core/common/main/en.xml
which comes from http://cldr.unicode.org/
The currency format should be related to the currency and not to the language. Don't you agree? 🤔
No, consider what CLDR do, it's related to a language.
No it seems logical that it depends on the language If you speak arabic for example, no matter which currency you are paying with you still want the website to be displayed in LTR. Switching to $ doesn't mean you want to switch your website display.
It's the same principle here (at least it seems to be the CLDR unicode point of view), the important is what language and what country you are from. I insist on the country as well, because PrestaShop comes with the en-us language, but you have an override dedicated to Denmark, if you take a look at localization/CLDR/core/common/main/en_DK.xml
config, you will see that the currency symbol is overriden with kr.
(although the pattern doesn't change so it still will be on the left of the number).
So you would need the language en_DK to have the behavior you are expecting. Sadly when you look at the language installation select box it is limited (because having 700+ languages would be too complicated).
Interesting, I did not know that. 😄 But it sounds legit.
Thanks for the explanation ! :)
Most helpful comment
No it seems logical that it depends on the language If you speak arabic for example, no matter which currency you are paying with you still want the website to be displayed in LTR. Switching to $ doesn't mean you want to switch your website display.
It's the same principle here (at least it seems to be the CLDR unicode point of view), the important is what language and what country you are from. I insist on the country as well, because PrestaShop comes with the en-us language, but you have an override dedicated to Denmark, if you take a look at
localization/CLDR/core/common/main/en_DK.xml
config, you will see that the currency symbol is overriden withkr.
(although the pattern doesn't change so it still will be on the left of the number).So you would need the language en_DK to have the behavior you are expecting. Sadly when you look at the language installation select box it is limited (because having 700+ languages would be too complicated).