views:

652

answers:

3

Hey guys...

I need to support Chinese in one of my application on Windows, the problem is that I need to support for Chinese Mandarin and I did not find any locale code for it, can you clarify whether Windows support Mandarin chinese or is there any alternate??

+1  A: 

Mandarin Chinese refers to a family of dialects of the spoken Chinese language.

Perhaps you're looking for Simplified Chinese, which is the written Chinese character set used in the People's Republic of China and other countries?

Edit I was able to find the Natural Language Support (NLS) API Reference from Microsoft, which provides the Culture Name used for internationalization, I believe. (I'm not sure how internationalization works in .NET.)

According to the table, there are seven Culture Names/Identifiers available for Chinese. (The Culture Names for Chinese starts with zh.)

Without more information about which specific Chinese language the internationalization should be targeted at, I think it's going to be a little bit difficult to narrow down. (Perhaps someone else has had some experience in this topic?)

coobird
+1  A: 

It's an uncommon request, but this could make sense for a spoken UI. That doesn't match the "wpf" tag though, forms are visual. You need to understand the problem better, though. coobird advised Simplified Chinese, but Mandarin is also spoken on the island of Taiwan. The written language there is Traditional Chinese.

Localization to both is similarly complex - besides getting your texts translated, you'll need to make sure you don't use bold text (doesn't work on either script) and make sure any linebreaking algroithm works when words are no longer stings of letters seperated by spaces.

MSalters
A: 

Since the question is tagged C# and .NET 3.5 I'm assuming the following .NET-specifics apply.

There's a hint on this page zh-Hans, zh-Hant and the "old" zh-CHS, zh-CHT

use the IETF standard "zh-Hans", and "zh-Hant" names for Chinese simplified and traditional ... in .Net 2.0/3.x we still recognize zh-CHS & zh-CHT for backwards compatibility ... LCID (0x0004 or 0x7C04)

And from W3 I18N FAQ

"zh-Hant" and "zh-Hans". These language codes do not represent specific languages. "zh-Hant" would indicate Chinese written in Traditional Chinese script. Similarly "zh-Hans" represents Chinese written in Simplified Chinese script. This could refer to Mandarin or many other Chinese languages.

I guess the key point is that Chinese Mandarin that you mentioned is a spoken dialect (for want of a better term), and Chinese (Simplified) is the 'character set' that is used to represent that spoken language 'on paper'. LocaleId 0x0004 according to coobird's link.

Other spoken languages (Cantonese?) are represented by different 'character sets' like Chinese (Traditional). If your application was going to Taiwan or Hong Kong you might use LocaleId 0x7C04.

  • NOTE: I'm not meaning 'character set' in the computerese/ASCII sense above ~ just distinguishing between the spoken and written representations. There's a whole other discussion on character sets/codepages/unicode (although generally .NET seems to cope with that stuff as long as your fonts are sorted out and you stick to UTF-8).
CraigD
Cantonese is not written in Traditional Chinese (anymore). Traditional Chinese is used primarily in Taiwan, where they don't speak Cantonese. Cantonese is spoken in continental China, where they use Simplified Chinese.
MSalters
And the difference between them is properly considered a "script" difference, not a "character set" difference.
MSalters
Thanks MSalters - I wasn't *sure* about Cantonese; I hope the remainder wasn't too misleading so as not to be useful for the original poster.
CraigD