NSLocale *countryLocale = [NSLocale currentLocale]; 
NSString *countryCode = [countryLocale objectForKey:NSLocaleCountryCode]; 
NSString *country = [countryLocale displayNameForKey:NSLocaleCountryCode value:countryCode]; 
NSLog(@"Country Code:%@ Name:%@", countryLocale, countryCode, country); 
//Country Code:IN Name:India
 
No comments:
Post a Comment