cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enke, Michael" <>
Subject Re: [PATCH] I18nTransformer decimal and grouping locale
Date Thu, 22 May 2003 08:47:05 GMT
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.
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.


Bruno Dumon schrieb:
> On Wed, 2003-05-21 at 08:15, Konstantin Piroumian wrote:
> > >
> > > However, the knowledge of what the decimal-separtor and group-seperator
> > > are for a certain locale is already present in the JRE for a large
> > > number of locales. Why not reuse that as the dec-and-grp-locale
> > > attribute is doing? Otherwise you'd have to define germans-for-* formats
> > > for all countries in which you are selling.
> >
> > So maybe for such cases it'd be easier to use the target country locale
> > (i.e. en_US) and just allow to override the currency sign? E.g.: 1,000.99 DM
> Would probably also work, I'd like to here from Michael if he finds this
> ok. But aren't there any other properties like the number of digits
> after the decimal point that should then also change? In the end it
> seems like a rather arbitrary choice in which direction the properties
> are copied over.
> (if you really don't like any of this, or want more time to think about
> this, I can revert the patch for now and reopen the bugzilla entry)
> --
> Bruno Dumon                   
> Outerthought - Open Source, Java & XML Competence Support Center

View raw message