views:

33

answers:

2

I have a calendar and can make local month names and short weekday names, for example weekdaynames with:

NSArray *weekdayNames = [[[[NSDateFormatter alloc] init] autorelease] shortWeekdaySymbols];

How can I localize these?

For example:

a daycounter i = 1..31

daystr = [NSString stringWithFormat: @" %i", daycounter];}

I get fine 1...31 in latin Numbers

What do I have to change/add that I get for example Arabic Numbers, Chinese Numbers etc?

A: 

You could remove the restrictions altogether.

daystr = [NSString stringWithString: @" %s", daycounter];}
mcandre
?? daycounter is a Integer (sorry i may have not been explizit.DayCounter is a INTEGER and Daystr have to be NSString
christian Muller
*explicit* and obviously you would have to change daycounter to a string.
mcandre
+1  A: 

I solved it now with:

NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
    daystr = [formatter stringFromNumber:[NSNumber numberWithInt:daycounter]];
    [formatter release];
christian Muller