Open ghost opened 9 years ago
@MatanGold I was going to ask for the same thing but when i read the documentation , I found that it is already implemented:
@property (nonatomic, copy) NSLocale *selectedLocale;
This is a convenience property to set/get the selected country using a locale. The picker will automatically select the correct country based on the local. To default the picker to the current device locale, you can say:
picker.selectedLocale = [NSLocale currentLocale];
@MatanGold or u can go to + (NSDictionary *)countryNamesByCode;
and edit the code inside the for loop to be like this :+1:
NSString *countryName
//workaround for simulator bug
// if (!countryName)
// {
countryName = [[NSLocale localeWithLocaleIdentifier:@"en_US"] displayNameForKey:NSLocaleCountryCode value:code];
// }
namesByCode[code] = countryName ?: code;
I need the country name to always be in English. (Disregard localization and i18n) (Localized country name is a great feature but I would like to have an option to define single permanent language). Is it possible with current code? Can you make it available? Great picker - Thanks!