-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
NSLocale property isn't considered at all, 'cos property is set after
-(void)initCommonmethod in
- (void)setLocale:(NSLocale *)loc, so it gives no effect.
To force locale work properly I had to change:
- (void)setLocale:(NSLocale *)loc {
_locale = loc;
}to
- (void)setLocale:(NSLocale *)loc {
_locale = loc;
self.calendar.locale = loc;
[self initPickerData];
}the problem that it also demand's repopulate dataSource array for years ( 10 000 by default).
It maybe seems that years are always presented as a numbers, and only take into consideration months that could have different names in other languages, but I found that this isn't true for japanese language (maybe others too)
Thus
- (void)initPickerData () {
....
_months = [dateFormatter monthSymbols]; /* it works only for months (looks good for japanese)
// Form list of years
[dateFormatter setDateFormat:@"yyyy"]; /* this doesn't and needs to be rewritten as @"yyyy年MM月dd日" */ I dunno maybe exists a better solution
Metadata
Metadata
Assignees
Labels
No labels
