tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Beckes <rbec...@gmail.com>
Subject Re: internationalization via tiles definition files
Date Tue, 20 Jul 2010 21:16:08 GMT
Antonio,

Struts2 & Tiles v 2.1.8.1....

I'm in the fact finding stage at the moment, but I like your solution below
and I will weigh the pro's and con's with another solutionI found. This
solution suggested implementing the com.opensymphony.xwork2.LocaleProvider
in the Struts action. I'm thinking either of these will give me the kind of
control I am looking for.

I'm new to Tiles, so I'm uncertain of the benefits of initialization
parameters over pure Java in this particular case.

Thanks,
Ryan




On Mon, Jul 19, 2010 at 2:28 AM, Antonio Petrelli <
antonio.petrelli@gmail.com> wrote:

> 2010/7/16 Ryan Beckes <rbeckes@gmail.com>:
> >
> 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.
>
> What version of Tiles are you using? Independently from it, the
> solution is valid for any version of it, but it would help in case of
> a bug.
> I think that you might want to write a custom LocaleResolver:
>
> http://tiles.apache.org/framework/apidocs/org/apache/tiles/locale/LocaleResolver.html
> This is the default one:
>
> http://tiles.apache.org/framework/tiles-core/xref/org/apache/tiles/locale/impl/DefaultLocaleResolver.html
>
> As you can see, it uses a locale in session or, if it is not found, it
> uses the locale specified by the request itself.
> When you're done, you have to configure it: do you configure Tiles via
> initialization parameters or via pure Java?
>
> Antonio
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message