I had a similar situation which I resolved the following way:
LocalActionClass sets the locale to whatever comes in the language parameter
from the LocaleForm if it supports so you have multiple ApplicationResources
files for each of the languages you'd like to support. Then it forwards the
request back to the view it came from. Now the trick here was that I wanted
to describe this action only once in struts-config.xml
    <!-- Locale Action from Device Confirmation View-->
    <action
      path="/locale"
      type="LocaleAction"
      name="localeForm"
      scope="request"
    >
    </action>

and I defined all the pages where the user can change the locale as global
forwards
  <global-forwards>
    <forward name="home" path="/index.vm"/>
    <forward name="rv" path="/registrationView.vm"/>
    <forward name="cv" path="/confirmationView.vm"/>
  </global-forwards>

so your link to change a locale from index.vm would be <a
href="/exp/locale.action?view=home&language=spanish"><img
src="images/spanish.jpg" border=0></a>

and from registrationView.vm     <a
href="/exp/interface.action?view=rv&language=spanish"><img
src="images/spanish.jpg" border=0></a>

locale form has two parameters: view and language. Since I use global
forwards instead of real view names, my user never sees them.

Cheers,
Ivan
----- Original Message -----
From: "James" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 05, 2003 2:11 PM
Subject: Localisation


> I have a LocaleActionClass that sets the locale according to which wee
flag
> the user clicks, my question is how in the struts-config.xml do i specify
it
> to forward to the page they changed locale on (i.e their original page).
>
> James
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to