You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jiří Chaloupka <ko...@chalu.cz> on 2009/04/15 19:33:10 UTC
localized tiles in Struts2
Hallo,
I tried to use localized tiles definition for some pages, which I do not
want to translate only by text elements. I have localized files for
insert in filestructure and localized tiles-defs.xml files as follows:
tiles-publicweb.xml:
<tiles-definitions
<definition name="homepage" template="/templates/baseTemplate.jsp"
<put-attribute name="header" value="/templates/banner.jsp" /
<put-attribute name="body"
value="/templates/publicweb/lang/cz/home_body.jsp" /
</definition
</tiles-definitions
similar for another language tiles-publicweb_en.xml:
<tiles-definitions
<definition name="crm.homepage" template="/templates/baseTemplate.jsp"
<put-attribute name="header" value="/templates/banner.jsp" /
<put-attribute name="body"
value="/templates/publicweb/lang/en/home_body.jsp" /
</definition
</tiles-definitions
and web.xml:
<servlet
<servlet-name tiles</servlet-name
<servlet-class org.apache.tiles.web.startup.TilesServlet</servlet-class
<init-param
<param-name
org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name
<param-value
/WEB-INF/tiles-defs.xml,/WEB-INF/tiles-publicweb.xml</param-value
</init-param
</servlet
by some documentation which I found I have to work, but in my app the
localized def is not loaded / is not used and only default localization
is used.
Is there any my mistake or is there any other way I have to use?
Thank you,
Jiri
__________ Informace od ESET Smart Security, verze databaze 4010 (20090415) __________
Tuto zpravu proveril ESET Smart Security.
http://www.eset.cz
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: localized tiles in Struts2
Posted by Antonio Petrelli <an...@gmail.com>.
Please write to the Tiles Users mailing list:
http://tiles.apache.org/mail.html
Antonio
2009/4/15 Jiří Chaloupka <ko...@chalu.cz>:
> Hallo,
> I tried to use localized tiles definition for some pages, which I do not
> want to translate only by text elements. I have localized files for insert
> in filestructure and localized tiles-defs.xml files as follows:
> tiles-publicweb.xml:
> <tiles-definitions
> <definition name="homepage" template="/templates/baseTemplate.jsp"
> <put-attribute name="header" value="/templates/banner.jsp" /
> <put-attribute name="body"
> value="/templates/publicweb/lang/cz/home_body.jsp" /
> </definition
> </tiles-definitions
> similar for another language tiles-publicweb_en.xml:
> <tiles-definitions
> <definition name="crm.homepage" template="/templates/baseTemplate.jsp"
> <put-attribute name="header" value="/templates/banner.jsp" /
> <put-attribute name="body"
> value="/templates/publicweb/lang/en/home_body.jsp" /
> </definition
> </tiles-definitions
>
> and web.xml:
> <servlet
> <servlet-name tiles</servlet-name
> <servlet-class org.apache.tiles.web.startup.TilesServlet</servlet-class
> <init-param
> <param-name
> org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name
> <param-value
> /WEB-INF/tiles-defs.xml,/WEB-INF/tiles-publicweb.xml</param-value
> </init-param
> </servlet
>
> by some documentation which I found I have to work, but in my app the
> localized def is not loaded / is not used and only default localization is
> used.
> Is there any my mistake or is there any other way I have to use?
>
> Thank you,
> Jiri
>
>
> __________ Informace od ESET Smart Security, verze databaze 4010 (20090415)
> __________
>
> Tuto zpravu proveril ESET Smart Security.
>
> http://www.eset.cz
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org