모바일개발(Mobile Dev)/IOS개발(ObjectC)

english locale for the displayName

테크한스 2015. 12. 10. 01:01
반응형

Query an english locale for the displayName

like this:

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

NSLocale *usLocale = [[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease];

NSString *country = [usLocale displayNameForKey: NSLocaleCountryCode value: countryCode];


반응형