Iphone – Cocoa/iPhone: How to create a Simplified Chinese localization of the app

cocoainternationalizationiphonelocalizationxcode

I'm in the middle of localizing my iPhone app, and I've gotten English, French, German and Japanese localizations working without any problems. Now I'm trying to get a simplified chinese localization working, and no matter what I try, the chinese .lproj bundle just won't be used when I have the phone set to simplified chinese.

One problem is that I'm not sure what the localization should be called. I've tried "Chinese", zh-Hans, zh-CN, zh_Hans, zh_CN and none of them work. I've even gone as far as digging around inside Remember The Milk's app bundle to see what they used. They're using zh_CN but that doesn't work for me.

Am I missing something obvious here? Do I need to update some plist somewhere? As far as I can see from reading the I18N documentation and looking at the relevant WWDC session video, all I should need to do is make sure I have the right .lproj bundle in my app bundle and I should be good to go… right?

If you think it would help, I can provide a test xcode project that demonstrates the problem…

Thanks

Best Answer

It's zh_CN for Simp. Chinese (简体中文), zh_TW for Trad. Chinese (繁體中文).

If you are testing zh_CN.lproj under Trad. Chinese Language setting, it won't work. Just make sure you are testing your app with correct system language setting. Also, the Localizable.strings should be encoded with UTF-16 encoding.

Update:
In latest Localization Programming Guide, these had been changed to zh-Hans and zh-Hant.

Particularly in Chinese dialects, a region code is not always the best way to specify the proper dialect or script. For example, traditional Chinese (Han) is the default language spoken in Taiwan and is identified by the code zh_TW in Mac OS X v10.3.9 and earlier. However, traditional Chinese is also commonly spoken in Hong Kong and Macao, which means the zh_TW designator is not entirely accurate in those locations. The new standard defines new tags for the traditional Chinese (Hant) and simplified Chinese (Hans) scripts. Thus, traditional Chinese spoken in any country uses the code zh-Hant. Traditional Chinese, as it is spoken in Taiwan, now uses the locale code zh-Hant_TW.

Related Topic