Change language based on resources files in ASP.NET MVC 4
asp.net-mvc, asp.net-mvc-4, razor, resources
Solution
One way you can do it is to have the drop down just redirect the page to a language specific URL (this is quite nice as you can send around language specific links) then in a base class on your controller, set the Thread's locale.
This blog post covers what I am talking about in better detail: Localization in ASP.NET MVC – 3 Days Investigation, 1 Day Job
Problem
I have 2 resource file : Resources.resx(has some strings in Romanian) and Resources.en-US.resx (has the same strings in English). I only want to change(in a dropdownlist, a listbox,...) witch resource file to use. It could be in _Layout.cshtml. I don't need to detect the user's culture. Q: How can I select a resource file from a page ? Edit : Can it be done without changing the default MapRoute ?