Cocoa/iPhone: How do I create a Simplified Chinese localization of my app?

| | August 4, 2015

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

4 Responses to “Cocoa/iPhone: How do I create a Simplified Chinese localization of my app?”

  1. 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.

  2. As digdog said above: “Also, the Localizable.strings should be encoded with UTF-16 encoding.”

    I found UTF-8 for Localizable.strings is alright too, I successfully made several language include zh_CN

    I was guided by following post:
    http://www.cocoabuilder.com/archive/cocoa/277415-localization-strings-in-utf16-vs-utf8.html

  3. when u add localization for any language other than Chinese
    u named as Arabic,German,e.t.c but for the chinese u have to restrict when naming because there are 2 chinese (simple and tradition) so in iphone localization u must named zh_CN(for simplified chinese)
    if u placed other name it could not translate
    so b carefull
    name must be

    zh_CN (for simplified chinese).

    it resolves ur problem
    :)

  4. Since iPhone likes to cache resources, you should clean up your app project and re-build it. Then everything will work fine with your localization.

Leave a Reply