Multiple languages in an ASP.NET MVC application?

前端 未结 6 2104
臣服心动
臣服心动 2020-12-04 12:47

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 stil

6条回答
  •  粉色の甜心
    2020-12-04 13:42

    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.

提交回复
热议问题