When using the I18N taglib Implementation-Version: 1.0.N20041118, the "i18n:formatCurrency" never display the currency symbol. This bug occurs with different "codding styles" : <i18n:message key="genericCurrencyNumber"> <i18n:messageArg value="<%=(Object) (new Float(sampleFloat))%>"/> </i18n:message> or <i18n:locale locale="<%=loc%>"> <i18n:formatCurrency value="<%=(Object) (new Float(sampleFloat))%>"/> </i18n:formatCurrency> </i18n:locale> The same problem can be seen in you example. I run my applications in Websphere Studio Application Devlopper (WSAD) version 5.1.2, in the Websphere Test Environment. Windows XP on a PC platform. Furthermore, an enhanced feature seems to miss in this taglib, for the Currency format. The programmer shoult be abble to set the currency and its symbol, whithout any relationship with the user locale. For example, if I am in France and want to by an object from USA, the application must show me the price in $ (USD) but not in € (EUR). Regards Christophe
I'm not sure I understand what you're trying to illustrate with your first example. <i18n:message> is essentially just a taglib interface into java.text.MessageFormat. Does your resource bundle contain something like: genericCurrencyNumber={0,number,currency} As for the second example, I'm really not sure why that wouldn't work. It should be the equivalent of: Format format = NumberFormat.getCurrencyInstance(loc); String s = format.format(new Float(sampleFloat)); Which prints a currency symbol just fine.
JSTL replaced the i18n taglib, so this won't be worked on.