The following method will return a two letter code of which language is set on the iOS device in question:
NSString *myLanguage = [[NSLocale preferredLanguages] objectAtIndex:0];
There’s a list of language codes on Wikipedia: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
Note that to compare the current value against a list of languages you support we need use the isEqualToString method. Here’s an example:
NSString *myLanguage = [[NSLocale preferredLanguages] objectAtIndex:0]; if ([myLanguage isEqualToString:@"de"]) { self.myLabel.text = @"Deutsch"; } else if ([myLanguage isEqualToString:@"en"]) { self.myLabel.text = @"English"; } else { self.myLabel.text = @"didn't work"; }
The following articles have helped me figure this out: