struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paweł Wielgus" <>
Subject Re: something I don't get with i18n in Struts2
Date Fri, 25 Jul 2008 11:18:17 GMT
Hi Jean-Philippe

try this:

Best greetings,
Paweł Wielgus.

On 25/07/2008, mague <> wrote:
>  Hello all,
>  Here is my understanding of internationalization in struts 1 & 2 :
>  In Struts 1.x, it's possible to use something like <bean:message
>  bundle="myBundle" key="some.key"/> to specify in which resource bundle
>  "some.key" is to be found.
>  As the Walking Tour of the Struts 2 MailReader Application explains, "In
>  Struts 2, message resources are associated with the Action class being
>  processed". Therefore, when one uses something like <s:text
>  name="index.login"/> there is no way (as far as I know) to specify the
>  bundle. It has to be the bundle associated with the action.
>  Now, here is my problem: I use Tiles in my application and, for example, I
>  have a tile for a navigation bar. This navigation bar is present on any page
>  sent to the brother which means that it is generated after every action. In
>  Strut1, I have a single resource bundle for the navigation bar, and I can
>  specify it in the jsp file that define the bar. In Struts2 I can see no
>  other way than duplicating all the keys related to the menu bar in the
>  resource bundle of every single action.
>  Such a duplication cannot the normal way of using a modern framework such as
>  Struts2. So where am I wrong ? What are the best practices in such a case ?
>  Jean-Philippe
> --
>  View this message in context:
>  Sent from the Struts - User mailing list archive at
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail:
>  For additional commands, e-mail:
View raw message