1

In my app i have changed my language to arabic from iPhone settings and when i open the app the app shows date picker in Arabic language. I used the NSLocale to show date picker in English language even if the language is set to Arabic in iPhone's Settings. Here is my code.

datePicker.date = [NSDate date];
NSLocale * locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
datePicker.locale = locale;

But when i select the date it returns me in Arabic language but in picker it shows date in US language format. Please help. gone through different links but didn't find my answer

Community
  • 1
  • 1
ankyy
  • 351
  • 6
  • 16
  • http://stackoverflow.com/questions/1151335/can-i-localize-a-uidatepicker/2265984#2265984 – Saad Apr 16 '15 at 11:54
  • possible duplicate of [UIDatePicker locale does nothing?](http://stackoverflow.com/questions/2648719/uidatepicker-locale-does-nothing) – Saad Apr 16 '15 at 11:55
  • 1
    Looking at both of the "duplicates" listed above, neither appears to provide a real answer. I'm guessing that you need to set the `calendar` property, but I haven't tried that. – Hot Licks Apr 16 '15 at 12:03

0 Answers0