k06a / ABCalendarPicker

Fully configurable iOS calendar UI component with multiple layouts and smooth animations.
MIT License
710 stars 119 forks source link

Change Language #37

Open hugoeue opened 10 years ago

hugoeue commented 10 years ago

how do i change the language of the calendar? now as it is the calendar picks que current language of the device but i want to force a diferente language specified by the user in settings... How can i accomplish this?

Ty for the great job so far, your help will be highly appreciated .

k06a commented 10 years ago

I think you need fork repo and replace all [NSLocale currentLocale] with locale properties for example...

hugoeue commented 10 years ago

i replaced all [NSLocale currentLocale] for [[NSLocale alloc] initWithLocaleIdentifier:@"it_IT"] to text and it didn't work :(

Update: if i do like this it works :)

self.dateFormatter.dateFormat = [NSDateFormatter dateFormatFromTemplate:@"d MMMM yyyy" options:0 locale:[NSLocale currentLocale]]; [self.dateFormatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"it_IT"]];

k06a commented 10 years ago

It will be perfect to make it configurable via property. If you'll code this, please make a pull request :)