Reputation: 69
I facing a problem with localization in iphone date picker.I want the date picker to show dates only in English, but now it takes the language which is set to the region in iphone settings.I tried various things which was not useful like the below.
setting the locale through code
NSLocale* locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_GB"];
[datePicker setLocale:locale];
[datePicker setCalendar:[locale objectForKey:NSLocaleCalendar]];
This did not work.If any one has good ideas to resolve the issue please help
Upvotes: 5
Views: 1641
Reputation: 9342
I think this is a known issue. The date picker seems to rely on the current user's country settings which you cannot change from code. In fact, I don't know what the locale property is there for. It simply does nothing.
Upvotes: 2