Reputation: 1288
I have a multi-language ios app, it can switch to correct language depends on ios system location. I want to know, for example, the system language is english, how do I assign app language to German or other languages?
Upvotes: 0
Views: 260
Reputation: 5499
Try adding this in main.m in the main() function, before UIApplicationMain() is called, the important thing is that these statements are executed before the app is launched
[[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:@"es", nil] forKey:@"AppleLanguages"]; //switching to spanish locale
[[NSUserDefaults standardUserDefaults] synchronize];
Upvotes: 1
Reputation: 26907
You can specify your default language in your Info.plist
file. The setting is called Localization native development region
. This language will be used as a default one.
Upvotes: 0