• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSNumberFormatterSpellOutStyle and localization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSNumberFormatterSpellOutStyle and localization


  • Subject: NSNumberFormatterSpellOutStyle and localization
  • From: Keith Blount <email@hidden>
  • Date: Sat, 30 Jun 2007 05:19:44 -0700 (PDT)

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

  • Follow-Ups:
    • Re: NSNumberFormatterSpellOutStyle and localization
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: Re: ScreenSaver Shell?
  • Next by Date: Re: NSNumberFormatterSpellOutStyle and localization
  • Previous by thread: Re: ScreenSaver Shell?
  • Next by thread: Re: NSNumberFormatterSpellOutStyle and localization
  • Index(es):
    • Date
    • Thread