views:

90

answers:

1

I've added several localizations to my osx applications.

  • English
  • Simplified Chinese
  • Traditional Chinese
  • Italian
  • French

and then trying to test other localization without change system language(default is English).

but no matter which language I set in the key CFBundleDevelopmentRegion at info.plist file. it always shows me the default (English) localization.

+1  A: 

From the docs:

CFBundleDevelopmentRegion (String - iOS, Mac OS X) specifies the native region for the bundle. This key contains a string value that usually corresponds to the native language of the person who wrote the bundle. The language specified by this value is used as the default language if a resource cannot be located for the user’s preferred region or language.

All that it does is specify what language you developed it in (for if there's no localization for the user's default language). It does not change localization used to what you set it to, if that localization exists in your application. To test that you must change your locale in System Preferences.

Wevah
wow, thanks. seems that I misunderstood the meaning of `CFBundleDevelopmentRegion`. so, is there any simple way to test different localizations without change system's language? (or should I post the question in a new thread?)
xhan
I'm not sure of one. Changing the system's language will only affect newly-launched applications, though, if that makes a difference.
Wevah