Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 19442 invoked from network); 19 Feb 2007 16:18:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Feb 2007 16:18:01 -0000 Received: (qmail 66428 invoked by uid 500); 19 Feb 2007 16:18:04 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 66381 invoked by uid 500); 19 Feb 2007 16:18:04 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 66370 invoked by uid 99); 19 Feb 2007 16:18:03 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Feb 2007 08:18:03 -0800 X-ASF-Spam-Status: No, hits=2.3 required=10.0 tests=HTML_MESSAGE,MAILTO_TO_SPAM_ADDR,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of hturksoy@gmail.com designates 66.249.92.173 as permitted sender) Received: from [66.249.92.173] (HELO ug-out-1314.google.com) (66.249.92.173) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Feb 2007 08:17:53 -0800 Received: by ug-out-1314.google.com with SMTP id 30so535383ugs for ; Mon, 19 Feb 2007 08:17:32 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=i3OgeEsCLDN9DPCvA+Os1R5zk2PU4uuoHXxbb9+IZ1ELlasyaKjbKVGMDTm+9Av90xn3V52P0jmWIVWILo+A5VCTmXqdscfv3PPWWC54gcjJnViWE6Sws6hunSTSyUb5DbJuU0KJlWVN6ep6FyS7BNvg6naVhOfTt0JHMd5R+iU= Received: by 10.78.150.7 with SMTP id x7mr1071490hud.1171901851686; Mon, 19 Feb 2007 08:17:31 -0800 (PST) Received: by 10.78.175.19 with HTTP; Mon, 19 Feb 2007 08:17:31 -0800 (PST) Message-ID: <7f813dac0702190817j28a28d76ub398994038d18ea5@mail.gmail.com> Date: Mon, 19 Feb 2007 18:17:31 +0200 From: "Hasan Turksoy" To: "Jakarta Commons Users List" Subject: Re: [validator] locale aware validator scripts required In-Reply-To: <877730.73305.qm@web83209.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_37059_4364198.1171901851649" References: <877730.73305.qm@web83209.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_37059_4364198.1171901851649 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Formatter is a one way of doing this... But i've used java.text.DecimalFormatSymbols class... like this: Locale defaultLocale = context.getApplication().getDefaultLocale(); DecimalFormatSymbols symbols = new DecimalFormatSymbols(defaultLocale); then use this "symbols" varible to get needed symbols; symbols.getGroupingSeparator(); symbols.getDecimalSeparator(); .... no matter what we used to get symbols.. important point is the logic.. is it reasonable,, applicable or not? regards.. hasan.. On 2/19/07, Mark A Fortner wrote: > > Perhaps I misunderstood. > > > as a workaround solution; i changed ValidatorScript.java(of shale.jar).. > it > > assigns current locale's decimal and thousand seperator into two global > > javascript variables.. > > resolting code is like below: > > var localeSpecificThousandSeperator = '.'; > > var localeSpecificDecimalSeperator = ','; > > > If you're changing the ValidatorScript.java class and using it to assign > locale dependent separators, then > it would be better to use the Formatter for this rather than having to > maintain that code. > > Mark > > ----- Original Message ---- > From: Steffen Heil > To: Jakarta Commons Users List > Sent: Saturday, February 17, 2007 10:02:41 AM > Subject: RE: [validator] locale aware validator scripts required > > Hi > > > You could probably use the java.util.Formatter class (which > > is Locale-aware) to handle these types of formatting problems. > > In JavaScript ? :( > > > Regards, > Steffen > > > > > ------=_Part_37059_4364198.1171901851649--