Re: NSNumberFormatterSpellOutStyle and localization
Re: NSNumberFormatterSpellOutStyle and localization
- Subject: Re: NSNumberFormatterSpellOutStyle and localization
- From: Deborah Goldsmith <email@hidden>
- Date: Thu, 5 Jul 2007 17:05:57 -0700
The set of languages that support NSNumberFormatterSpelloutStyle is a
little limited, but does include French and German. If you're not
getting French and German when the locale is set properly, please
file a bug.
NB: This data comes from the ICU open source project (icu-
project.org). If you want to add support for additional languages,
that's the place to do it.
Deborah Goldsmith
Internationalization, Unicode liaison
Apple Inc.
email@hidden
On Jun 30, 2007, at 5:19 AM, Keith Blount wrote:
Hi,
In my app, the user can enter certain tags into their
text in a text view that will, upon export, be
converted into sequential numbers spelled out as
words.
For instance, if the user typed:
"<$w> and <$w> and <$w>"
the exported output would be:
"one and two and three"
This is done using a number formatter with
NSNumberFormatterSpellOutStyle, along the following
lines:
// 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?
Thanks,
Keith
______________________________________________________________________
______________
Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s
user panel and lay it on us. http://surveylink.yahoo.com/gmrs/
yahoo_panel_invite.asp?a=7
_______________________________________________
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
_______________________________________________
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