>From the DecimalFormat JavaDoc (which <bean:write> uses) .... "The grouping separator is commonly used for thousands, but in some countries it separates ten-thousands. The grouping size is a constant number of digits between the grouping characters, such as 3 for 100,000,000 or 4 for 1,0000,0000. If you supply a pattern with multiple grouping characters, the interval between the last one and the end of the integer is the one that is used. So "#,##,###,####" == "######,####" == "##,####,####". "
So your format "##,##,##,##0.00" will use the "##0" to determine the group size is 3 - the same as your "default" pattern. Niall ----- Original Message ----- From: "Muhammad Momin Rashid" <[EMAIL PROTECTED]> To: <user@struts.apache.org> Sent: Monday, January 17, 2005 10:24 AM Subject: problem with formatKey in bean:write > Hello All, > > I have a page in which I am trying to display formated balance using > following bean:write tag. > > <bean:write name="account" property="balance" formatKey="format.amount" /> > > The balance property is BigDecimal. The format.amount is defined in my > .properties files as format.amount=###,###,##0.00 for default, and > format.amount=##,##,##,##0.00 for en_PK locale. > > The problem is that even when the user is in en_PK locale, the amount is > still being formatted as in default locale. The other items on the same > page come from the correct locale (en_PK). I even tried outputting the > value of format.amount using bean:message tag, and it picks up and dispays > the correct value. > > Am I doing something wrong here? or it is a bug with bean:write tag while > applying localised format to amounts. > > Regards, > Muhammad Momin Rashid > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]