NSLocale.currentLocale in iOS always returns en_US. Does not return the language of iPad

261 Views Asked by At

I am using the following code:

NSLocale *locale = NSLocale.currentLocale;
NSString *countryCode = [locale objectForKey:NSLocaleCountryCode];
NSString *langaugeCode =[locale objectForKey:NSLocaleLanguageCode];

and the language code always comes back to be en_US even if I switch the language of my iPad. Any suggestions of what I might be doing wrong?

0

There are 0 best solutions below