cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Piroumian" <>
Subject Re: [PATCH] I18nTransformer decimal and grouping locale
Date Wed, 21 May 2003 06:15:58 GMT
From: "Bruno Dumon" <>

> On Tue, 2003-05-20 at 20:20, Konstantin Piroumian wrote:
> The i18n:number element already supports attributes such as pattern and
> fraction-digits. It seems then only logical to also add
> decimal-seperator and group-seperator attributes. Adding a feature to
> define reusable formats, like you propose above, is a different thing.


> 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

Also for such cases having reusable formats would help. You could even
define them in a separate file and include somehow. For example, in Struts
you can define the formatting pattern in a dictionary, just like any other

> One thing that on second sight seems less than ideal though is the name
> of the "dec-and-grp-locale" attribute. Something like
> "separators-locale" would be more readable.

Yes, this name is not the best one.


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

View raw message