new2ios new2ios - 4 months ago 16x
iOS Question

How in iOS to localize text of the month in UIDatePicker, and if it is possible at all?

I make search and up to now I see that UIDatePicker is working with localization of the device.

I have app which has internal lozalization. I need to change month's text dependantly of my internal localization. As I read it appears that this is not possible - I have to make my own custom picker.

Is there a way to achieve that without custom Dat picker?


Use locale property of UIDatePicker. I can't see any signs that the property is deprecated.

This code will localize picker to Japanese.

[datePicker setLocale: [NSLocale localeWithLocaleIdentifier:@"ja"]];

Replace "ja" with any language code you need.