본문 바로가기
모바일개발(Mobile Dev)/IOS개발(ObjectC)

english locale for the displayName

by 테크한스 2015. 12. 10.
반응형

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];


반응형