klazuka / Kal

A calendar component for the iPhone (the UI is designed to match MobileCal)
http://www.thepolypeptides.com
1.22k stars 346 forks source link

How to localize the Day names ? #105

Open maulikpat opened 8 years ago

maulikpat commented 8 years ago

I wanted to localize the day names Sun Mon

Is this possible ?

maulikpat commented 8 years ago

OK I got it.

in KalView.m file - (void)addSubviewsToHeaderView:(UIView *)headerView method

change for NSArray *weekdayNames = [[[NSDateFormatter alloc] init] shortWeekdaySymbols];

Need to add formatter

NSDateFormatter fr = [[NSDateFormatter alloc] init]; fr.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"fr"]; // fr for my case NSArray weekdayNames = [fr shortWeekdaySymbols];