Wrong currency presentation

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
Hi

I have a website that is meant for Sweden.
So everything is in Swedish, and I have chosen Swedish Krona as default currency.
My problem is that the prices are not presented in Swedish format.

It's presented like this:
"1.299,00" and it should have been
"1 299,00" or just
"1 299"

I have made 2 screenshots showing the problem.
Does anyone know what could be wrong?

Best regards,
Axel



5 years ago
That is actually the correct format to display Swedish currency:

Format: 999.999.999,00 kr
Group Size: 3
Grouping Character: . (Dot)
Decimal Character: , (Comma)
Currency Symbol: kr

https://www.freeformatter.com/sweden-standards-code-snippets.html.

With your settings nopCommerce will format the amount like this:

amount.ToString("C", CultureInfo.GetCultureInfo("sv-SE"));

However you can customize the formatting by providing a value to the Custom Formatting field in the settings for the currency.

For example if you want format: 1 299 kr
Enter Custom Formatting: # ### kr

nopCommerce will then format the amount like this:

amount.ToString("# ### kr")
5 years ago
mgustafsson wrote:
That is actually the correct format to display Swedish currency:

Format: 999.999.999,00 kr
Group Size: 3
Grouping Character: . (Dot)
Decimal Character: , (Comma)
Currency Symbol: kr

https://www.freeformatter.com/sweden-standards-code-snippets.html.

With your settings nopCommerce will format the amount like this:

amount.ToString("C", CultureInfo.GetCultureInfo("sv-SE"));

However you can customize the formatting by providing a value to the Custom Formatting field in the settings for the currency.

For example if you want format: 1 299 kr
Enter Custom Formatting: # ### kr

nopCommerce will then format the amount like this:

amount.ToString("# ### kr")


Thanks for you answer.
I see what you mean, so how come a lot of swedish webshops use a space (or nothing) instead of a dot?

Like these:

https://stayhard.se/05851241/alpha-industries/ma1tt-bomber-sage-green01
https://www.netonnet.se/art/gaming/spel-och-konsol
https://cdon.se/hem-tradgard/greatwhite-elcykel-herr-26-36v-litiumbatteri-lostagbart-p47003211
https://www.sportamore.se/produkter/klader/jackor/?gender=herr

The problem for me with the custom formatting is that a zero (0) will be presented as:
" kr" without the zero
5 years ago
You can use 0 for mandatory place and # for optional.

For example format: # ##0 kr - would result in:

0 -> 0 kr
1299 > 1 299 kr
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.