如何本地化新的“帖子”使用 ASP.net MVC

发布于 2024-08-09 06:04:41 字数 443 浏览 4 评论 0原文

我今天刚刚开始本地化,需要一些信息。

我有一个在 ASP.net MVC 中运行的项目,使用 .resx(全局/本地)文件根据页面上所选的语言放置文本。但这是预制/静态内容。例如,如果您有博客,如何对新帖子执行此操作?您是否必须通过加载不同的部分页面来完成此操作,例如[本地化 asp.net 视图和母版页][1] 中的内容?什么是常见的?想不出一个合适的谷歌术语来查找这方面的信息。

我不知道正常的程序是什么,所以关于这个主题的任何信息都会很有趣。

[1]:http://www.ondotnet。 com/pub/a/dotnet/2002/09/30/manager.html 本地化 asp.net 视图和母版页

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://www.ondotnet.com/pub/a/dotnet/2002/09/30/manager.html localizing for asp.net views and master pages

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

岁月静好 2024-08-16 06:04:41

对于要本地化的实际内容,您可以使用 3 种方法:

  1. 用不同的语言编写它们,并在数据库中添加包含帖子语言的字段。根据当前语言过滤控制器中的帖子。
  2. 使用自动翻译服务进行翻译 (Google API - Microsoft API
  3. 保留原始语言的帖子并向网站添加翻译小部件(例如 < a href="http://www.istartedsomething.com/" rel="nofollow noreferrer">此网站)

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)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文