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 < [email protected]> wrote: > 2010/7/16 Ryan Beckes <[email protected]>: > > > 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 >
