IOS - About Language Localize

 

When you define a traditional Chinese in a  ZH-Hant.strings file , and then use "NSLocalizedStringFromTable(key)" to get the traditional Chinese value . You finally get the key value , not the traditional Chinese value you expected .

 

// Be carefule , zh-Hans & zh-Hant can recognize by Mac , but not iphone

#define Localize_ZH_Hans @"zh-Hans"  // on mac

#define Localize_ZH_Hant @"zh-Hant"  // on mac

 

#define Localize_zh_CN @"zh_CN"     // on ios

#define Localize_ZH_TW @"zh_TW"     // on ios

 

So , you all to do is change the name of the .strings file : ZH-Hant.strings ->  zh_TW.strings  (change to "zh_TW.strings" ) . Then you will get the value you want.

 

 

posted @ 2013-09-08 21:54  makemelike  阅读(303)  评论(0编辑  收藏  举报