struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Incze Lajos <in...@mail.matav.hu>
Subject Re: localizing direct template content with bean:message
Date Thu, 01 Mar 2001 21:09:08 GMT
On Thu, Mar 01, 2001 at 12:46:17PM -0500, Deadman, Hal wrote:
> I wanted to localize direct content when using templates such as the
> title of a page. I modified the bean:message tag so it would read its
> key from the tag body if it wasn't specified as an attribute. Is there a
> better way to internationalize direct content with templates? Are there
> any other reasons that someone would want to get the bean:message key
> from the body of the tag? Are there reasons why this doesn't make sense?
> 
>  
> <bean:message>
> <template:get name="titlekey" flush="false"/>
> </bean:message>
> 

You don't need to modify the current code as your goals are pretty
straight with it:

<template:put name="title">
  <bean:message key="titlekey" />
</template:put>

and

<template:get name="title" />

                                                             incze

Mime
View raw message