Discover iOS language

How to determine the language of iOS in iOS?

+4
source share
1 answer
[[[NSUserDefaults standardUserDefaults] objectForKey:@"AppleLanguages"] objectAtIndex:0]]; // us 

This writes to NSString the current country code so that you can discover the current language.

Or use this to get the current language and region:

 NSString *locale = [[NSLocale currentLocale] localeIdentifier]; // en_US 
+12
source

Source: https://habr.com/ru/post/1334826/


All Articles