2008/2/8, Michael Halliday <[EMAIL PROTECTED]>:
>
> Hey list!!
>
> Just a question regarding the use of NSNumberFormatter vs NumberFormat.
>
> We're working on localizing one of our app for use in multiple
> countries.  We are dealing with decimal and currency formats in a
> variety of locales.  Just wondering what everyone else uses and the
> pros and cons of using NumberFormat over NSNumberFormatter or Wonders
> ERXNumberFormatter.
>
> If we have a format string such as "$#,##0.00" NSNumberFormatter
> doesn't correctly localize the currency symbol, it does substitute the
> correct symbol, but not necessarily in the right position.   IE for
> United States, France and Germay
>
> US            ---> $1,100.59
> France     ---> €1 100,59  Should be --> 1 100,59 €
> Germany ---> €1.100,59  Should be --> 1.110,59 €
>
> If I use the NumberFormat.getCurrencyInstance( LOCALE ) it formats the
> numbers correctly.  NSNumberFormat doesn't provide a "currencyInstance".
>
> We could use NumberFormat throughout our app and not use
> NSNumberFormatter at all ... but I'm just wondering what other
> functionality we would lose ... does NSNumberFormatter do anything
> "special" that NumberFormat does not.
>
> Also, does anyone know if NSNumberFormatter will suffer the same
> depreciated fate the NSTimestampFormatter has?  I guess that's a
> question for Pierre.
>
> Any help or ideas would be greatly appreciated!  I just don't want to
> go down one path and find that I should have taken another :).


Hi Michael,
    Look I'm not an expert of this, but I see that NumberFormat has not the
format() method for Objects (it has format(long), format(double)), so you
cannot use it for Number or BigDecimal Instances (in my apps I only use
BigDecimal for operations).

    And of course you have to set methods for getting the strings, and not
simply bind it in the numberFormat binding.



Thanks!!!
> Michael.
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/ildenae%40gmail.com
>
> This email sent to [EMAIL PROTECTED]
>



-- 
Daniele Corti
AIM: S0CR4TE5
Messenger: [EMAIL PROTECTED]

--
Computers are like air conditioners -- they stop working properly if you
open
WINDOWS

-- 
What about the four lusers of the apocalypse? I nominate:
"advertising", "can't log in", "power switch" and "what backup?"
--Alistair Young
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to