asp.net MVC4中的全球化 [英] Globalization in asp.net MVC4

查看:102
本文介绍了asp.net MVC4中的全球化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想在我的mvc4应用程序中实现全球化和本地化.我经历了一些教程,例如 http://afana.me/post/aspnet-mvc-internationalization.aspx [ ^ ]
但是问题是他正在为每种语言创建多个视图.如果有10个视图,则我们必须为每种语言创建10个视图,总共100种.请指导我创建具有单个视图以及PO文件(如果可能)的多语言(即8种语言)应用程序的最佳方法.
在此先感谢

Hi,
I want to implement globalization and localization in my mvc4 application. I gone through a couple of tutorials like http://afana.me/post/aspnet-mvc-internationalization.aspx[^]
But the problem is he is creating multiple views for each language. If there are 10 views then we have to create 10 views for each language adding up to 100. Please guide me the best way of creating multilingual(i.e 8 languages) application with single view and if possible with PO files.
Thanks in advance

推荐答案

那是一个很好的教程.如您所见,有树型选项:要么使用单独的视图,要么使用资源,要么将两者结合在一起.每个人都有自己的优点和缺点,或更准确地说,是彼此之间的优点.但是没有人会帮您摆脱工作:)
PO文件就像资源文件一样,但此技术并未真正支持PO文件.如果您喜欢此变体,请阅读第2部分 [
That is a good tutorial. As you could see, there are tree options: either you use separate views, or you use resources, or you combine both. Every one has it''s own pros and cons, or more precisely advantages over the other. But none will save you from doing the job :)
PO files are just like resource files, but not really supported in this technology. If you prefer this variant, read part 2[^] of that tutorial.

You can also implement a different approach, in special cases, but these are the major paths.


这篇关于asp.net MVC4中的全球化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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