I\'d like to show the current language that the device UI is using. What code would I use?
I want this as an NSString
in fully spelled out format. (Not
Solution for iOS 9:
NSString *language = [[NSLocale preferredLanguages] objectAtIndex:0];
language = "en-US"
NSDictionary *languageDic = [NSLocale componentsFromLocaleIdentifier:language];
languageDic will have the needed components
NSString *countryCode = [languageDic objectForKey:@"kCFLocaleCountryCodeKey"];
countryCode = "US"
NSString *languageCode = [languageDic objectForKey:@"kCFLocaleLanguageCodeKey"];
languageCode = "en"