• 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
Re: numberformat problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: numberformat problems


  • Subject: Re: numberformat problems
  • From: Greg Hulands <email@hidden>
  • Date: Fri, 16 Jul 2004 12:41:50 +1000

I am just trying to fix this is my code and I still do not have a
dollar sign. I put this in my Application class:

ERXLocalizer.setDefaultLanguage("English");
ERXLocalizer.localizerForLanguage("English").setLocalizedNumberFormatFor
Key(NumberFormat.getCurrencyInstance(), "$#,##0.##");

But all this seems to do is throw an exception when It needs to use the
formatter.

Anyone know how to fix it?

Greg

On 07/07/2004, at 10:16 PM, Michael Engelhart wrote:

> But what is it "localized" from?  Is it getting the browser language
> settings?   If so then it's not working on Mac OS X.   If not then
> what is the default language?   Also the problem is only on Safari and
> Firefox running on Mac OS X.  When I load the page with IE 6.0 on
> Windows XP the formatters without any modification to the ERXLocalizer
> works just fine.
>
> Thanks
> Mike
> On Jul 7, 2004, at 3:07 AM, Anjo Krank wrote:
>
>>
>> Am 07.07.2004 um 00:01 schrieb Michael Engelhart:
>>
>>> ACtually - yeah that's it.  I just upgraded to Wonder 2.0 this
>>> morning.   hmm...
>>> On Jul 6, 2004, at 4:45 PM, Greg Hulands wrote:
>>>
>>>> I have noticed this too since upgrading to Wonder 2.0. Are you the
>>>> same?
>>
>> That's probably because the date/numberformat is now localized by
>> default in WOString, WOTextField and WOText...so if you give if a
>> String "#,##0.0", you get "1.000,0" if the session's localizer is
>> German.
>>
>> You can set the formatter to use by using
>> ERXLocalizer.localizerForLanguage("English").setLocalizedNumberFormatF
>> orKey(new MyFormat(), "#,##0.0").
>>
>> I introduced this fix so format strings could be used via D2W rules
>> and string bindings and still get localized string. More info should
>> be in ERXLocalizer.
>>
>> Cheers, Anjo
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Fwd: numberformat problems (From: Michael Engelhart <email@hidden>)
 >Re: numberformat problems (From: Chuck Hill <email@hidden>)
 >Re: numberformat problems (From: Michael Engelhart <email@hidden>)
 >Re: numberformat problems (From: Michael Engelhart <email@hidden>)
 >Re: numberformat problems (From: Anjo Krank <email@hidden>)
 >Re: numberformat problems (From: Michael Engelhart <email@hidden>)

  • Prev by Date: WOSwitchComponent problem...
  • Next by Date: Re: Connection to SQLServer2000
  • Previous by thread: Re: numberformat problems
  • Next by thread: Re: numberformat problems
  • Index(es):
    • Date
    • Thread