You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ryan Beckes <rb...@gmail.com> on 2010/07/16 20:21:11 UTC

internationalization via tiles definition files

Hello,

I'm new to struts 2, so I read the "Starting Struts 2" book by Ian Roughley
(very good intro!) and started playing around with the Struts blank
application.

I've been able to add tiles integration to the blank application (version
2.1.8.1). I'm trying to add internationalization to tiles via this
instruction set...

 http://tiles.apache.org/tutorial/advanced/l10n.html

... by creating a tiles_es.xml file...

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE
tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles
Configuration 2.0//EN"
"http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
<tiles-definitions>
  <definition name="/example/HelloWorld.jsp" extends="baseLayout">
    <put-attribute name="title" value="Hola a Todos" />
    <put-attribute name="body" value="/fragments/HelloWorld.jsp" />
  </definition>
</tiles-definitions>

... and calling this link ...

http://localhost:8080/struts2-blank-2.1.8.1/example/HelloWorld.action?request_locale=es

... but the title ("Hola a Todos") never changes, it seems that tiles is not
picking up the tiles_es.xml file. Can anyone see if I am missing something?

Thanks,
Ryan

Re: internationalization via tiles definition files

Posted by Antonio Petrelli <an...@gmail.com>.
Try to ask the Tiles Users mailing list:
http://tiles.apache.org/mail.html

Antonio

2010/7/16 Ryan Beckes <rb...@gmail.com>:
> Hello,
>
> I'm new to struts 2, so I read the "Starting Struts 2" book by Ian Roughley
> (very good intro!) and started playing around with the Struts blank
> application.
>
> I've been able to add tiles integration to the blank application (version
> 2.1.8.1). I'm trying to add internationalization to tiles via this
> instruction set...
>
>  http://tiles.apache.org/tutorial/advanced/l10n.html
>
> ... by creating a tiles_es.xml file...
>
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE
> tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles
> Configuration 2.0//EN"
> "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
> <tiles-definitions>
>  <definition name="/example/HelloWorld.jsp" extends="baseLayout">
>    <put-attribute name="title" value="Hola a Todos" />
>    <put-attribute name="body" value="/fragments/HelloWorld.jsp" />
>  </definition>
> </tiles-definitions>
>
> ... and calling this link ...
>
> http://localhost:8080/struts2-blank-2.1.8.1/example/HelloWorld.action?request_locale=es
>
> ... but the title ("Hola a Todos") never changes, it seems that tiles is not
> picking up the tiles_es.xml file. Can anyone see if I am missing something?
>
> Thanks,
> Ryan
>

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