First of all, sorry I've been so noisy on this list lately ;-)
One thing I neglected to mention when describing the <i18n:formatXXX> tags
was the use of the new <i18n:locale> tag. The <i18n:locale> tag acts as a
'locale context' for use by all the <i18n:formatXXX> tags.
All of the <i18n:formatXXX> tags can have an explicit Locale specified:-
<i18n:formatCurrency value="<%= n %>" locale="<%= Locale.FRANCE %>"/>
If no locale is specified then the format tag attempts to find the outer
<i18n:locale> tag and use its Locale instance. If no <i18n:locale> tag can
be found then the Locale is derived from the current HTTP request. If still
no locale can be found then the default JVM locale is used.
So the following JSP would output a currency and percentage for France...
<i18n:locale locale="<%= Locale.FRANCE %>">
<i18n:formatCurrency value="<%= n %>"/>
<i18n:formatPercent value="<%= n %>"/>
</i18n:locale>
Or the Locale can be defined using the language, country and (optional)
variant codes...
<i18n:locale language="fr" country="CH">
this is Swizerland with French language
</i18n:locale>
or
<i18n:locale language="fr" country="CH" variant="WIN">
Windows variant of Swizerland with French language
</i18n:locale>
A future enhancement could be to support the creation of Locale instances as
scriplet variables or look them up by name.
e.g.
<i18n:locale id="zurich" scrope="application" language="de" country="CH"
variant="WIN"/>
then later...
<i18n:formatPercent value="<%= 99.9 %>" locale="<%= zurich %>"/>
or lookup a locale via name later on...
<i18n:locale name="zurich">
<i18n:formatCurrency value="<%= cost %>"/>
</i18n:locale>
James
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com