Why do you need to specify a culture when setting the currency?
Hi Matt,
I was wondering, why do you have to set the culture when setting the currency? If I'm honest, I can't see a good reason for that, in fact is seems counter intuitive to me.
For example, lots of countries use Euro's, this setup implies you have to set up a Euro currency for every culture you want to be able to use Euro's. So French, Germany, Spain, etc etc. It seems like a lot of overkill so wondering the reason behind it.
Where as ideally you'd set up a single "Euro" currency and the culture would related to the country / the current culture of the web request/visitor browser etc?
The culture is only used for formatting the currency so you don't need to create a currency per country, just ensure that the culture you use is relevant to the currency.
ie, I think most countries that use the Euro will format prices like €100.00,00 so you only need to ensure you choose a relevant culture that formats in that way. Then you can reuse the Euro currency as much as you like.
Thanks Matt :-) Just wonder if it's really needed or if there was a way where it would be possible to leave it blank. It's a bit confusing from an editors perspective when they want to set up their shop :-)
I guess in theory we could try looking one up, but it's whether they needs to be an explicit choice and whether there are times there could be a currency unkown by C#?
Why do you need to specify a culture when setting the currency?
Hi Matt,
I was wondering, why do you have to set the culture when setting the currency? If I'm honest, I can't see a good reason for that, in fact is seems counter intuitive to me.
For example, lots of countries use Euro's, this setup implies you have to set up a Euro currency for every culture you want to be able to use Euro's. So French, Germany, Spain, etc etc. It seems like a lot of overkill so wondering the reason behind it.
Where as ideally you'd set up a single "Euro" currency and the culture would related to the country / the current culture of the web request/visitor browser etc?
Thanks
Nik
Hey Nik,
The culture is only used for formatting the currency so you don't need to create a currency per country, just ensure that the culture you use is relevant to the currency.
ie, I think most countries that use the Euro will format prices like
€100.00,00
so you only need to ensure you choose a relevant culture that formats in that way. Then you can reuse the Euro currency as much as you like./Matt
Thanks Matt :-) Just wonder if it's really needed or if there was a way where it would be possible to leave it blank. It's a bit confusing from an editors perspective when they want to set up their shop :-)
Nik
I guess in theory we could try looking one up, but it's whether they needs to be an explicit choice and whether there are times there could be a currency unkown by C#?
https://stackoverflow.com/a/9231693
Matt
is working on a reply...