本文介绍了什么是system.globalization,什么是它与本地化之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

和香料的事情了一下,什么是全球化Asp.net MVC应用程序

and to spice things a bit , what is the best approach for globalization in Asp.net Mvc App

推荐答案

全球化是关于生产从字符串或标识符映射到其他语言的翻译,而本地化是有关使用地图,找到正确的翻译。在开发过程中发生的全球化,本地化发生在运行时。

Globalization is about producing a map from strings or identifiers to translations in other languages, while Localization is about using that map to find the correct translation. Globalization happens during development, localization happens at runtime.

我不是很有经验的ASP.NET这样做,但是......

I'm not very experienced doing this with ASP.NET, but...

至于如何的,最常见的方法,我看到的是有每语言的字典中每个装配(或每UI组件),其中值的本地化字符串。键是通常在一个静态类或枚举只读成员。常常有一个方便的类,其成员的的地图从标识的本地化消息。

As for how, the most common approach I see is to have a dictionary per language per assembly (or per UI component), where the values are localized strings. The keys are typically readonly members on a static class or enum. There is often a convenience class whose members are the map from identifiers to localized messages.

该字典通常存储在单独的文件,并有针对性地人工翻译的格式。

The dictionaries are typically stored in separate files and in a format targeted to human translators.

这里更多:http://msdn.microsoft.com/en-us/library/aa478974.aspx

这篇关于什么是system.globalization,什么是它与本地化之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 13:14