jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Dawson <tdaw...@wamnet.com>
Subject [VOTE] i18n taglib release
Date Tue, 27 Mar 2001 13:25:13 GMT
The last vote stopped after a number of improvements were suggested by
Marius Scurtescu and others, and it became clear that a few changes needed
to be made before releasing the taglib.

In particular, 
* log4j has been removed, replaced by servelt context's log() which, while
far less configurable, is sufficient for the needs of this taglib
* <i18n:localize bundle=""> is now <i18n:bundle baseName="" locale="">
* locale can be specified as either an object, or as a localeAttribute which
can be placed in the request, page, or session. (or application, but that's
unlikely). this allows applications which ask the user to specify their
language, rather than autosensing the browser's preference
* locale is optional - if not specified, the browser setting is used
* the baseName is required now; code related to application attributes and
deployment descriptor variables has been removed.
* <i18n:require> is now <i18n:ifdef> 
* <i18n:ifndef> has been added
* some miscellaneous implementation cleanup was done

Here is a quick example of some tag uses:

   <i18n:bundle baseName="com.mycompany.product.component"
                localeAttribute="userLocale"/>

   <i18n:message key="test1" /> 

   <i18n:message key="test2"> 
     this only displayed <em>if</em> 'test2' not found. 
   </i18n:message> 

   <i18n:message key="test1" args="<%= objectArray %>" />

   <i18n:message key="test2"> 
     <i18n:messageArg value="<%= dateArg %>" /> 
     <i18n:messageArg value="<%= numberArg %>" /> 
   </i18n:message> 

   <i18n:ifdef key="specialDisclaimer"> 
     The contents of this tag will only be evaluated for locales that
     have the specialDisclaimer key defined.
   </i18n:ifdef>

   <i18n:ifndef key="specialDisclaimer"> 
     The contents of this tag will only be evaluated for locales that
     do NOT have the specialDisclaimer key defined.
   </i18n:ifndef>

I'd like to call another vote, to see if we can get this version approved
and included in the standard distribution.

Thanks,

Tim Dawson
Chief Software Architect
WAM!NET, Inc.


Mime
View raw message