Here is a list of locale identifiers and their country name:
How to get a list of country names based for each LocaleIdentifier?
-
04-10-2022 - |
Question
I need two NSArray one with all countries and the other one with the corresponding LocaleIdentifier.
Like:
NSArray *countries = @[@"United States", @"Brazil", @"Spain"];
NSArray *identifiers = @[@"en_US", @"pt_BR", @"sp_SP"];
So if anyone could lead me how can I get this programmatically or any other source I'd be thankful!
La solution
Autres conseils
You should try using NSLocale displayNameForKey:value: as explained on this link
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow