JMS1965
asked on
ASP.NET: Regional Currency Formats across Different Browsers
I have an ASP.NET application, which should display currency and date values in the format of the user's region. I thought that the region could be determined from the browser, but maybe not in all browsers?
For example, in a gridview there is a column that displays currency values. The format string for the column is "c2". Viewing this page with Internet Explorer, I can go to Tools --> Internet Options --> Languages; and if I change the language from "en-US" to any other culture, the currency format is changed to match the selected culture, as desired.
But, I have a user in the United Kingdom who says that viewing the gridview on his iPhone or iPad, the values are displayed for the U.S. (using the dollar symbol in currency and month before day in dates).
What can be done so that dates and currency values are formatted appropriate to the user's region / culture, regardless of the browser being used?
Thanks in advance -
Julie
P.S. This is a large site where dates and currency values are used on most pages.
For example, in a gridview there is a column that displays currency values. The format string for the column is "c2". Viewing this page with Internet Explorer, I can go to Tools --> Internet Options --> Languages; and if I change the language from "en-US" to any other culture, the currency format is changed to match the selected culture, as desired.
But, I have a user in the United Kingdom who says that viewing the gridview on his iPhone or iPad, the values are displayed for the U.S. (using the dollar symbol in currency and month before day in dates).
What can be done so that dates and currency values are formatted appropriate to the user's region / culture, regardless of the browser being used?
Thanks in advance -
Julie
P.S. This is a large site where dates and currency values are used on most pages.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
1. Provide a drop-down list of cultures so the user can choose
or
2. Determine the culture from the IP address.
I know how to do #1; I'll just need to find a list of the cultures to present to the user.
For #2, I searched a bit and found examples of how to get the user's IP, but wasn't able to find an example of how to determine the culture from that.
I think I'll plan on using option #1, unless there's an advantage to using option #2?
I'll leave this open topic open for a bit in case there's any additional information I should consider.
Thanks very much!