cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Piroumian" <kpiroum...@apache.org>
Subject Re: [PATCH] I18nTransformer decimal and grouping locale
Date Thu, 22 May 2003 11:37:32 GMT
From: "Bruno Dumon" <bruno@outerthought.org>
> On Thu, 2003-05-22 at 10:58, Konstantin Piroumian wrote:
> > From: "Enke, Michael" <michael.enke@wincor-nixdorf.com>
> >
> > > 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

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
>
>


Mime
View raw message