Localization iphone uidatepicker

I am having a problem with localization in iphone date picker. I want the date picker to show dates only in English, but now it accepts the language that is set in the region in the iphone settings. I tried various things that were not useful as shown below.

  • locale setting in nib uidatepicker file.
  • language setting using code

    NSLocale* locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_GB"];
    [datePicker setLocale:locale];
    [datePicker setCalendar:[locale objectForKey:NSLocaleCalendar]];
    

This did not work. If anyone has any good ideas to solve the problem, please help.

+5
source share
1 answer

, . , , , . , , locale. .

+2

All Articles