I am developing an application for Mac OS X. I want to change indication contents by the language locale (English, Spanish, etc.) of the application user, how do I get informati
To be exact there is a change with iOS 9 and greater where [NSLocale preferredLanguages] now return - instead of only . So it's better to do:
NSString *languageOS = [[NSLocale preferredLanguages] objectAtIndex:0];
if([[[UIDevice currentDevice] systemVersion] floatValue] >= 9.0) {
languageOS = [[languageOS componentsSeparatedByString:@"-"] objectAtIndex:0];
}