On Mon, 17 Jan 2005 17:54:55 +0900, Sylvain ~ <[EMAIL PROTECTED]> wrote:
> By the way, I don"t want to have ONE internationilized title for all
> my pages, so I can't do that, it would have been too simple !!
> I have many pages, having different i18n titles, 

You can extend the main.layout and override the title for the
different pages like so

<definition name="main.layout" path="/WEB-INF/jsp/layout_main.jsp">
           <put name="title" value="main.title" />
           <put name="header" value="/WEB-INF/jsp/layout_header.jsp" />
           <put name="footer" value="/WEB-INF/jsp/layout_footer.jsp" />
   </definition>
   <definition name="login.layout" extends="main.layout">
       <put name="title" value="login.title"/>
       <put name="body" value="/WEB-INF/jsp/loginform.jsp" />
   </definition>


> so I think wrinting
> an Action to get the message is maybe the smartest but not easiest way
> of doing this.
> 
> On Mon, 17 Jan 2005 09:17:46 +0100, Lesaint Sébastien
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > To solve this problem I use this code in my jsp:
> > <title>
> > <tiles:importAttribute name="title" />
> > <bean:message name="title" scope="page" />
> > </title>
> >
> > Pretty easy, isn'it? :)
> >
> > Seb'
> >
> > -----Message d'origine-----
> > De : Sylvain ~ [mailto:[EMAIL PROTECTED]
> > Envoyé : lundi 17 janvier 2005 09:02
> > À : user@struts.apache.org
> > Objet : i18n & Tiles
> >
> > I'm trying to create an internationalized application, and when I
> > tried to template it with Tiles, I found something missing, or which
> > seems impossible to be simply solved :
> >
> > When using tiles with definitions in a centralized file, the put tag
> > doesn't offer ability to set a key to automatically get the
> > internationlized string like on most of Struts tags.
> >
> > For example, I want the html title property of each page to be
> > localized, here for the loginform.jsp page.
> >
> > my tiles definitions :
> >
> >    <definition name="main.layout" path="/WEB-INF/jsp/layout_main.jsp">
> >            <put name="title" value="TO CHANGE" />
> >            <put name="header" value="/WEB-INF/jsp/layout_header.jsp" />
> >            <put name="footer" value="/WEB-INF/jsp/layout_footer.jsp" />
> >    </definition>
> >    <definition name="login.layout" extends="main.layout">
> >        <put name="body" value="/WEB-INF/jsp/loginform.jsp" />
> >    </definition>
> >
> > Is there someone who have an idea to (simply) solve this ?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to