cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: [PATCH] I18nTransformer decimal and grouping locale
Date Thu, 22 May 2003 19:56:26 GMT
On Thu, 2003-05-22 at 20:55, Enke, Michael wrote:
> Konstantin Piroumian wrote:
[...]
> > 
> > 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" />
> > 
> > What do you think?
> 
> I'm not sure if I understand you correct.
> Do you mean: get currency format instance for (in this example) de_DE
> and override FormatSymbols with FormatSymbols from NumberFormat en_US?
> I do override with DecimalFormatSymbols. Isn't this what I did?
> Ok, we can change the names:
> What I called "dec-and-grp-locale" can be "locale"
> and what I had "locale" can be "currency-locale". This is more straight forward.
> Than it is what you mean? Ok.
> 
> If I did not got you, do you mean the other way?
> Get currency format instance for en_US and override with somethink from de_DE?
> Keep in mind that not all currencies have 2 digits behind the decimal separator.
> There are countries without digits behind decimal.
> 

Lets not make this thing even more confusing :-)

It still works as you originally implemented it, but from the user POV
it is more logical to specify the currency locale, because for your
american user, the default locale will be en_US, and it is only for
formatting that specific number that you want to user another currency.

(things are updated in CVS -- just give it a try)

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Mime
View raw message