Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 64527 invoked by uid 500); 22 May 2003 11:37:21 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 64514 invoked from network); 22 May 2003 11:37:21 -0000 Received: from office.oilspace.com (213.219.58.70) by daedalus.apache.org with SMTP; 22 May 2003 11:37:21 -0000 Received: from kpiroumian (ns.informtek.com.ru [195.239.59.130]) by office.oilspace.com (Postfix) with SMTP id 94E66144 for ; Thu, 22 May 2003 12:37:18 +0100 (BST) Message-ID: <0a1101c32056$8965c3d0$a52efea9@kpiroumian> From: "Konstantin Piroumian" To: References: <20030520155514.22182.qmail@nagoya.betaversion.org> <001601c31efc$97119690$c8eb14ac@kot> <1053459441.29909.129.camel@yum.ot> <000601c31f60$7e889e70$a7e913ac@kot> <1053507733.4685.157.camel@yum.ot> <3ECC8E89.26A12ADD@wincor-nixdorf.com> <094601c32040$51000f20$a52efea9@kpiroumian> <1053601886.14205.149.camel@yum.ot> Subject: Re: [PATCH] I18nTransformer decimal and grouping locale Date: Thu, 22 May 2003 15:37:32 +0400 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N From: "Bruno Dumon" > On Thu, 2003-05-22 at 10:58, Konstantin Piroumian wrote: > > From: "Enke, Michael" > > > > > Again: Someone from US wants to see a currency for european country: 12345 > > Euro and 67 cent. > > > In de_DE this would be 12.345,67 Euor > > > in en_US this would be $12,345.67 > > > The guy from US should see: 12,345.67 Euro > > > The guy rom Germany should see: 12.345,67 Euro > > > This is the case if a e.g. McDonalds manager from US want to see the net > > sale amount of > > > the German headquarter. > > > I use of course the information from JRE to get the grouping and decimal > > separator. > > > I reuse them, but the locale must be known. > > > > Yes, I understand quite well this issue. Ok. Let's try to do it other way: > > you specify the currency of the value, get a currency format instance and > > override NumberFormatSymbols using the target locale. E.g.: > > > > So compared to the previous situation: > > > > do I understand correctly that the only thing changed are some attribute > names? (not to dismiss its importance, I just want to verify I > understood what you meant) > > locale becomes currency-locale > dec-and-grp-locale becomes locale I'd say this another way: - locale stays as it was before - dec-and-grp-locale becomes 'currency-locale' or something better (e.g. 'currency-code' or just 'currency'). I must admit that I hadn't time to take a look at the current implementation, so it can be only the attribute name change. Anyway, IMHO, specifying the currency instead of group/decimal separators is more natural when you need to display some currency value in a specific locale, isn't it? Regards, Konstantin > > -- > Bruno Dumon http://outerthought.org/ > Outerthought - Open Source, Java & XML Competence Support Center > bruno@outerthought.org bruno@apache.org > >