Re: NSNumberFormatterSpellOutStyle and localization
Re: NSNumberFormatterSpellOutStyle and localization
- Subject: Re: NSNumberFormatterSpellOutStyle and localization
- From: Ricky Sharp <email@hidden>
- Date: Sat, 30 Jun 2007 07:54:09 -0500
On Jun 30, 2007, at 7:19 AM, Keith Blount wrote:
// Spelled out (lowercase)
numberFormatter = [[NSNumberFormatter alloc] init];
[numberFormatter
setFormatterBehavior:NSNumberFormatterBehavior10_4];
[numberFormatter
setNumberStyle:NSNumberFormatterSpellOutStyle];
autoNumber = 1;
[returnStr replaceCharactersInRange:range
withString:[[numberFormatter
stringFromNumber:[NSNumber
numberWithInt:autoNumber++]] lowercaseString]];
I had assumed that the formatter would automatically
localize the spelling of the numbers to the system's
default language, but some non-English users are
telling me that they are still getting "one, two,
three" etc when they should be getting "ein, zwei" or
"un, deux" etc.
So, does anybody out there know how to localize
NSNumberFormatterSpellOutStyle?
[numberFormatter setLocale:[NSLocale currentLocale]];
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden