Search code examples
c#web-configglobalizationculture

How to set culture automatically based on browser accept language?


I tried to configure out enableClientBasedCulture key in globalization section of web.config. I've found the same question here.

MSDN told they are not already supporting this option. Is there any replacement or analogue to implement this setting?

I don't want to write my own DelegatingHandler (to parse request header by hands) for this basic feature.


Solution

  • Setting <globalization uiCulture="auto" culture="auto" /> (without enableClientBasedCulture) in web.config worked for me in ASP.NET MVC4.