struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cedric Dumoulin <ced...@apache.org>
Subject Re: i18n in SimpleMenuItem
Date Sat, 22 Feb 2003 10:50:27 GMT

  Hi,

  The Tiles config files should contain the resource keys (<put 
name="title" value="a.key" />). You use this keys in the jsp file in 
conjunction with tags accepting such keys:
<tiles:importAttribute />
<bean:write name="a.key" />.

  You can implement your own SmartMenuItem, taking a key as input, and 
providing the translated value as output ... You should find a way to 
specify the resource bundle to use.

        Cedric


Dan Allen wrote:

>Has anyone written a class (which they would like to share) that
>extends SimpleMenuItem to retrieve the bundle key for value and
>global forward for the link?
>
>I was envisioning something along the lines of:
>
><item name="webapp.page.news" value="news"
>classname="org.apache.struts.titles.bean.SmartMenuItem"/>
>
>I am not even interested in the global forward as much as the
>bean:message bundle resource.
>
>Also, while I am on the topic of tiles.  Is there any way to use the
><bean:message key="webapp.title"/> in the tiles definition file?  I
>know that you can have different definition files for different
>languages, but it would seem to be more logical to be able to
>reference the application message bundle instead.  It would seem to
>me a new "type" of message would be the most approrpriate if it is
>not already possible to do this.
>
>I would be grateful for any responses to those two inquires.
>
>Dan
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message