C
Claes Bergefall
I would like to format dates etc in the format that the user browsing the
page would prefer according to his language setting. The DateTimeFormatInfo
class provides all the information I need, but how do I get an instance of
it (or something else that has the info)?
Using DateTimeFormatInfo.Current doesn't work. It gives me the server
settings.
Using HttpRequest.UserLanguages to create a culture doesn't work either. The
language I get from that collection doesn't contain any country/region code
so I get a neutral culture that doesn't have any DataTimeFormatInfo
Is there a way to get the prefered date and time settings for the user that
requested the page?
/claes
page would prefer according to his language setting. The DateTimeFormatInfo
class provides all the information I need, but how do I get an instance of
it (or something else that has the info)?
Using DateTimeFormatInfo.Current doesn't work. It gives me the server
settings.
Using HttpRequest.UserLanguages to create a culture doesn't work either. The
language I get from that collection doesn't contain any country/region code
so I get a neutral culture that doesn't have any DataTimeFormatInfo
Is there a way to get the prefered date and time settings for the user that
requested the page?
/claes