How to localize ASP.NET MVC application?

What would be best practice to localize your ASP.NET MVC application?

I would like to cover two situations:

  • one application deployment in IIS which would handle multiple languages
  • one language/application deployment.
  • In first situation should you go with some kind of view based thing like, ~/View/EN, ~/View/FI, ~/View/SWE or something different?

    What about second case, just application based config via Web.config and point these different languages to different URLs?


    你也可以看看这里ASP.NET MVC 2本地化完整指南和ASP.NET MVC 2模型验证本地化这些条目将帮助你,如果你使用ASP.NET MVC 2。


    You would localize your ASP.NET MVC application very much in the same way you would a classic ASP.NET Web Form application.

    You wouldn't use different pages/views for each language, but each page would support multiple languages using satellite assemblies.

    You can look at Matt Hawley's blog entry for more explanation and examples.


    Unfortunately, Matt Hawley's original code doesn't work in the release version of ASP.NET MVC. Check out an updated post: http://blog.eworldui.net/post/2008/10/ASPNET-MVC-Localization-via-View-Engines.aspx

    In general, the localization process isn't as smooth in the VS 2008 / ASP.NET MVC world as it is with traditional web forms. http://www.guysmithferrier.com/post/2009/05/Localizing-ASPNET-MVC.aspx

    链接地址: http://www.djcxy.com/p/61848.html

    上一篇: ASP.NET MVC领域:它们对于大型应用程序很重要吗?

    下一篇: 如何本地化ASP.NET MVC应用程序?