struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: i18n implementation
Date Fri, 06 Dec 2002 02:54:21 GMT

On Thu, 5 Dec 2002, Eric Tse wrote:

> Date: Thu, 5 Dec 2002 16:02:35 +0800
> From: Eric Tse <>
> Reply-To: Struts Users Mailing List <>,
>      Eric Tse <>
> To:
> Subject: i18n implementation
> Dear all,
> I am designing the framework of an enterprise application which serves 3
> large groups of user. And of each group has 3 GUI language selections. I
> am now trying to generalize the functions so as to reuse most of the
> codes and deploy as a single application with different context-param,
> i.e. each group has its JAR.
> For the language issue, I do not want the web designer to "copy and
> paste" those JSP into 3 sets to make 3 distinct GUI webpages. (ie. 3 x 3
> = 9 JARs)
> Do you have any recommendation in producing 3 GUI languages? Do I really
> necessary to create 3 JARs with different web.xml to load the
> .properties files?
> Any recommendation is welcome!

If you mean that each page of the application needs to be visible in
multiple languages, that is what tags like <bean:message> is for.  Indeed,
my need to do this a few years ago (but in twelve languages) was one of
the early motivations that drove the me to create Struts.

As an example of this in action, load the struts-example.war (recent
nightly build) into your favorite server and change your browser's
language preference to Japanese, then access the app.  Same exact pages --
but the prompts and error messages are displayed in a different language.

The example app doesn't have a "choose your language" switcher control,
but that would be quite easy to add.  All you'd need is an Action that
stored the corresponding Locale in the user's session under the key
represented by the Action.LOCALE_KEY string.

> ---
> Eric Tse


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message