开发者

How to localize new 'posts' with ASP.net MVC

开发者 https://www.devze.com 2022-12-10 13:48 出处:网络
Im just starting with localization today and need some information. I have a project running in ASP.net MVC using .resx (global / local) files to place text based on the chosen language on the page.

Im just starting with localization today and need some information.

I have a project running in ASP.net MVC using .resx (global / local) files to place text based on the chosen language on the page. But this is premade/static content. How to do this for, for instance, new posts if you have a blog? Do you have to do it by loading different partial pages like in [localizing asp.net views and master pages][1] ? What is common? Can not think of a decent google-term to find information on this.

I have no idea what the normal procedure would be, so any information on this topic would be lovely.

[1]: http://开发者_JAVA百科www.ondotnet.com/pub/a/dotnet/2002/09/30/manager.html localizing for asp.net views and master pages


For the actual content to be localized you can use 3 approaches:

  1. Write them in different languages and add a field in the database with the language of the post. Filter the posts in the controller according the current lang.
  2. Use an automatic translate service to do the translation (Google API - Microsoft API)
  3. Leave the post in the original languages and add a translate widget to the site (like this site)
0

精彩评论

暂无评论...
验证码 换一张
取 消