ASP.NET MVC 本地化最佳实践? [英] ASP.NET MVC localization best practice?

查看:20
本文介绍了ASP.NET MVC 本地化最佳实践?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要本地化 asp mvc 应用程序的最佳实践方面的帮助,我看到 Oxite 在 BaseController 中有一个名为 Localize 的基本方法,但是本地化是视图任务还是控制器任务?还是应该使用 resx 文件/或使用 db 表?

解决方案

创建自己的Html helper,并像<%= Html.Resource("Name") %> 那样使用它p>

详细信息在 博客 帖子.

I need help with the best practice to localize asp mvc apps, I saw Oxite having a base method named Localize in the BaseController, but is the Localization a task for the view or the Controller? Or should I use resx files / or use db tables?

解决方案

Create your own Html helper and use it like <%= Html.Resource("Name") %>

Details are in blog post.

这篇关于ASP.NET MVC 本地化最佳实践?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆