In an ASP .Net MVC application. I want to make sure my code is getting its strings from the resource files of the correct culture. I know I can put something like the following on the code:
Thread.CurrentThread.CurrentCulture = myCultureInfo;
Thread.CurrentThread.CurrentUICulture = myCultureInfo;
and it will work. I was just wondering if there is a way of doing it without modifying the source code. I remember someone showed me quite a while ago that by changing some setting in IE could do the trick but I do not what exactly he changed and if you can do something similar with Chrome and/or FireFox.
You could use the element in your web.config to set the culture to some specific value or set it to
automeaning that the client settings will be used:Now ASP.NET will use the culture configured on the client browser. For example in FireFox:
I would also recommend you reading the following blog post on globalization in ASP.NET.