tags:

views:

11

answers:

1

I want my app to support zh_CN. my code is "⋯⋯setlocale(LC_ALL, "zh_CN");⋯⋯"。 problem comes with, it works in simulator, but not in my iPad.

wht's wrong!!

A: 

You don't use setlocale() on iOS to perform localisation (it exists on Mac OS X, which is why it works in the simulator - but Cocoa apps don't use it either). Here's Apple's overview of i18n and l10n in iOS applications - simply put you provide a set of resources in zh_CN.lproj, and if your user chooses that locale she gets those resources instead of the English (or whatever other language(s) you support).

Graham Lee
thank you! it works now!