views:

49

answers:

1

I know how to force localization with this code

[[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:@"fr", nil] 
forKey:@"AppleLanguages"];

And I know how to localize Default.png (different bundles English.lproj, French.lproj...). Now imagine the phone language is English, but the user set the application language to be French. How can I force the app to use the Default.png in French.lproj?

I tried to put the code above in main() even before UIApplicationMain(), but it doesn't work.

+1  A: 

As crazy as it may sound, i think the "Apple way" to do this is not have a language setting inside your App at all. Actually you shouldn't have any settings in your App at all. You should create a settings bundle that will show upp in the Settings app. I know that very few apps do this as not all users are aware that there are App-specific settings in the Settings App, but this is the "right" way around.

However, I do not think this will fix your Default.png issue. To load the correct Default.png, your app should strictly adhere to the system language setting ie. you should have no language settings at all.

Maciej Swic