NSLocale Archives

How to retrieve the current User Locale

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 […]