Multiple languages in an ASP.NET MVC application?

Lance Fisher picture Lance Fisher · Aug 6, 2008 · Viewed 41.2k times · Source

What is the best way to support multiple languages for the interface in an ASP.NET MVC application? I've seen people use resource files for other applications. Is this still the best way?

Answer

Haacked picture Haacked · Aug 7, 2008

If you're using the default view engines, then local resources work in the views. However, if you need to grab resource strings within a controller action, you can't get local resources, and have to use global resources.

This makes sense when you think about it because local resources are local to an aspx page and in the controller, you haven't even selected your view.