You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jo...@shell.ca on 2003/11/18 19:02:54 UTC

Internationalization: Tiles vs MessageResources

Hello,

I am looking for some informative opinions here. Anyone who has written
a web app with Struts knows how easy it is to write a single JSP that
can support any number of languages by placing locale-specific content
into a MessageResource properties file. Although this is great for
simple apps, I am having great difficulty justifying its use in larger
applications. If I have a page that contains a large amount of text,
then I need to place all this text into the MessageResources file, which
is not great for formatting text. I also find it cumbersome that if I
have a list of text, that I need to place each list item as a seperate
property inside the MessageResources file.

It may be a problem of me not using Struts to its full potential, and if
that is the case, I would be very gracious if other developers would
share their knowledge about how they deal with international Struts
content in large enterprise applications. I also find that puts a great
deal of restriction on business content and layout. In my situation, I
am only responsible for creating and maintaining the dynamic features of
our Struts-enabled website: the business people create and manipulate
content however they like (it does not really make much difference to me
what they put on the site). That being said, everytime our business
people want to make changes to the content of some of our JSP pages, it
is quite a harried process of having to add new layout to the existing
pages and then adding new content to the MessageResources file.

I was thinking that a better solution may be present by using the
internationalization features of the Tiles framework. I can lock down as
much of the layout as I need to, while still providing the business a
great deal of flexibility in their layout. That is, I can create a main
layout that will be used on all the pages and several layouts of
associated tiles. I can then pass the business people the tiles that
contain the actual content and they can make whatever changes they need
to. When they are finished, I just need to add the new tile back into my
project without having to make any additional changes. They key benefit
here, I think, is that the business people can edit these tiles using
Dreamweaver or whatever other editor they want and they can see right
away the changes that they want to make with less intervention from
myself or other IT people. Plus, by using the internationalization of
Tiles, we can still maintain the idea of "1 layout, multiple languages"
while still providing flexibility to the business (and avoiding the
messiness of MessageResource files).

I would really like to hear opinions on this, so please feel free to
discuss and post your opinions and examples.

Thank you very much.

John Pitchko
Programmer/Analyst
Downstream Marketing Systems - e-Business Group
Shell Canada Limited
(403)-691-2572
john.pitchko@shell.ca