I'd like to check which language is set on the device.
Here I get the language:
NSString *language = [[NSLocale preferredLanguages] objectAtIndex:0];
But how can I check if english is set with an if-statement?
I'd like to check which language is set on the device.
Here I get the language:
NSString *language = [[NSLocale preferredLanguages] objectAtIndex:0];
But how can I check if english is set with an if-statement?
Check out the description on Apple's language designations page, which links to more complete lists for the language and region codes. Looks like you're pretty safe just checking that the first two letters are "en".