- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
作为我们产品本地化的一部分,我们需要同时支持繁体中文和简体中文,但我看到这些zh-CN
、zh-TW
、zh-hans
, zh-hans
.我不想在每个文件夹中创建 4 个包含资源文件的文件夹。我希望 zh-CN
,zh-hans
和 zh-TW
,zh-hant
一样一样。
我用 zh-hans
和 zh-hant
创建了 2 个文件夹,ResourceManager
自动解析 zh-CN
到 zh-hans
和 zh-TW
到 zh-hans
。是否有关于 ResourceManager
始终执行此映射的文档,我找不到任何文档。
最佳答案
我在 MSDN 上找到了各种“注释”:
A neutral culture is specified by only the two-letter lowercase language code. For example, "fr" specifies the neutral culture for French, and "de" specifies the neutral culture for German.
There are two culture names that contradict this rule. The cultures Chinese (Simplified), named zh-Hans, and Chinese (Traditional), named zh-Hant, are neutral cultures. The culture names represent the current standard and should be used unless you have a reason for using the older names "zh-CHS" and "zh-CHT".
CultureInfo.CreateSpecificCulture
The example uses the zh-CHS and zh-CHT culture names. However, applications that target Windows Vista and later should use zh-Hans instead of zh-CHS and zh-Hant instead of zh-CHT. zh-Hans and zh-Hant represent the current standard and should be used unless you have a reason for using the older names.
Note also that the results of the example may differ on an installation of Taiwanese Windows, where the input of a Chinese (Traditional) neutral culture (zh, zh-CHT, or zh-Hant) will return zh-TW.
The example displays the older zh-CHS and zh-CHT culture names with the 0x0004 and 0x7C04 culture identifiers, respectively. However, your Windows Vista applications should use the zh-Hans name instead of zh-CHS and the zh-Hant name instead of zh-CHT. The zh-Hans and zh-Hant names represent the current standard, and should be used unless you have a reason for using the older names.
关于c# - 支持中文繁体和中文简体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19180248/
我是一名优秀的程序员,十分优秀!