cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <>
Subject Re: [PATCH] I18nTransformer decimal and grouping locale
Date Thu, 22 May 2003 11:11:26 GMT
On Thu, 2003-05-22 at 10:58, Konstantin Piroumian wrote:
> From: "Enke, Michael" <>
> > At the time of writing I'm on vacation so I did not follow the thread.
> > But from what I read in this mail:
> > The format of currencies in difference to number is not only the currency
> sign,
> > it is also if it stands before or after the number and maybe something I
> do not know.
> > So I'm writing software for retail business and thought a long time about
> this.
> > That's why I choose this approach.
> I see.
> But it also not only overriding the grouping and decimal separators. E.g.
> for arabic countries you'll need to change also the digit characters.
> > 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.:
> <i18n:number type="currency" locale="en_US" currency-locale="de_EURO" />

So compared to the previous situation:

<i18n:number type="currency" locale="de_DE" dec-and-grp-locale="en_US">

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

Bruno Dumon                   
Outerthought - Open Source, Java & XML Competence Support Center                

View raw message