Jason Zhao
Jason Zhao

Reputation: 1288

Assign specific language in multi-language ios app

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

Answers (2)

tkanzakic
tkanzakic

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

Adam
Adam

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

Related Questions