Re: NumberFormat and German Locale

2011-07-12 Thread tdk
ok, thanks everyone who contribute. My conclusion is quite simple: since I only have a localized pattern, I won't be able to use that and format the numbers acc. to it. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group

Aw: Re: NumberFormat and German Locale

2011-07-12 Thread Jens
NumberFormat.getDecimalFormat() just gives you a formatter using a default format string. If you want to use your own formatting string you have to use NumberFormat.getFormat(). In your case you have to use NumberFormat.getFormat("#,##0.0##"). The symbols "," and "." are special symbols used by

Re: NumberFormat and German Locale

2011-07-12 Thread tdk
On 12 Jul., 10:26, Thomas Broyer wrote: > You're confusing the syntax of the pattern you give to NumberFormat for > parsing, and then the use of that NumberFormat within the context of a > locale. > What you *give* to NumberFormat is locale-insensitive: #,##0.0## > When you have that NumberForma

Re: NumberFormat and German Locale

2011-07-12 Thread Thomas Broyer
You're confusing the syntax of the pattern you give to NumberFormat for parsing, and then the use of that NumberFormat within the context of a locale. What you *give* to NumberFormat is locale-insensitive: #,##0.0## When you have that NumberFormat instance, what it does then depends on the curre

Re: NumberFormat and German Locale

2011-07-11 Thread tdk
Tom, Rob, thanx for this valuable information. That default is not "default" is quite interesting, I wasn't aware of that. But then the question is, how do I change the NumberFormat so that it uses the set locale, eg de_DE, instead of "default"? I have not been able to find/understand a way to do

Re: NumberFormat and German Locale

2011-07-11 Thread Thomas Broyer
In a pattern, a dot is always the decimal separator and a comma always represents the thousands separator. When you render a number using the pattern, those separators might appear differently depending on the locale (e.g. the decimal separator being a comma and the thousands separator being a

Re: NumberFormat and German Locale

2011-07-11 Thread Rob Coops
Default locale is actually default, not necessarily the local set. I don't have access to my code at the moment so I'll have to do this from the top of my head and without actually working code... but I'll give it a try. When a new user accesses the app I check the locale, to see what this is set

NumberFormat and German Locale

2011-07-11 Thread tdk
I have severe problems, understanding and using com.google.gwt.i18n.client.Numberformat, hoping somebody out there can help and enlighten me. When I try to get a formatter via NumberFormat.getFormat(pattern) I get an InvalidPatternException even so my pattern is valid within the german locale, eg