问题描述
作为产品本地化的一部分,我们需要支持繁体中文和简体中文,但是我看到这些zh-CN
,zh-TW
,zh-hans
,zh-hant
具有多种文化.我不想用每个文件夹中的资源文件创建4个文件夹.我希望zh-CN
,zh-hans
相同,并且zh-TW
,zh-hant
相同.
As part of localization for our product we need to support both Chinese traditional and Chinese simplified but I see multiple cultures for these zh-CN
, zh-TW
, zh-hans
, zh-hant
. I don't want to create 4 folders with resource files in each folder. I want zh-CN
,zh-hans
to be same and zh-TW
,zh-hant
to be the same.
我用zh-hans
和zh-hant
创建了2个文件夹,并且ResourceManager
自动将zh-CN
解析为zh-hans
,将zh-TW
解析为zh-hans
.是否有关于此的文档,ResourceManager
始终执行此映射,我找不到任何映射.
I created 2 folders with zh-hans
and zh-hant
, and the ResourceManager
is automatically resolving zh-CN
to zh-hans
and zh-TW
to zh-hans
. Is there a documentation regarding this that the ResourceManager
always does this mapping, I couldn't find any.
推荐答案
我在MSDN上发现了各种注释":
I found various "Notes" on MSDN:
有两个文化名称与此规则相矛盾.文化 中文(简体),命名为zh-Hans,中文(繁体),命名为 zh-Hant,是中立文化.文化名称代表当前 除非您有理由使用 较早的名称为"zh-CHS"和"zh-CHT".
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
还请注意,示例结果可能与 安装台湾Windows,输入中文 (传统)中立文化(zh,zh-CHT或zh-Hant)将重新出现 zh-TW.
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.
这篇关于支持繁体中文和简体中文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!