0

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?

Fogmeister
  • 76,236
  • 42
  • 207
  • 306
user3550084
  • 71
  • 2
  • 9
  • "British English" is "en-GB", "American English" is "en-US". I believe. Either way it will **begin** with "en". – Fogmeister Sep 15 '14 at 15:35

1 Answers1

2

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".

RishiG
  • 2,790
  • 1
  • 14
  • 27