sri
sri

Reputation: 1005

Supporting Chinese traditional and Chinese simplified

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.

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.

Upvotes: 4

Views: 4540

Answers (1)

devio
devio

Reputation: 37205

I found various "Notes" on MSDN:

CultureInfo Class

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.

CultureInfo.Parent

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.

Upvotes: 3

Related Questions