You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by giglian <an...@smurfitkappa.it> on 2007/11/30 15:34:21 UTC

Struts 2.0.11 localization issue

my web app display message in jsp page ( using <s:text name="......."/>)
always in one language.
I have two localization files (package.properties and package_it.properties
in the same folder), and I always get the messages in Italian language even
if the client language is English (en-us).
Rather in my production environment (O.S. Windows Server 2003 English), the
same web app always displaying the same messages in English language even if
the client language (IE 6) is Italian (it).
I tried to do everythings but with any result.
Please help me to solve this issue.
Thanks in advance for your time.

Andrea
-- 
View this message in context: http://www.nabble.com/Struts-2.0.11-localization-issue-tf4913375.html#a14065489
Sent from the Struts - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Struts 2.0.11 localization issue

Posted by Ted Husted <hu...@apache.org>.
The request_local functionality is part of the Interceptor stack, and
so the request has to go through as a Struts Action. An ordinary JSP
isn't processed as a Action, any more than a HTML page would be.

Otherwise, once the locale is changed, it should stick as part of the
session. The two things that could defeat the locale would be losing
the session, or resetting it with another link. The MailReader example
is localized, so the first question would be whether that example
works on the target system or not.

-- HTH, Ted
<http://www.husted.com/ted/blog/>


On Nov 30, 2007 9:42 AM, Andrew Stepanenko <an...@gmail.com> wrote:
> I have something similar like this. If I append request_locale=uk to a
> JSP there is no effect, and still the default locale from
> struts.properties is displayed. If I append request_locale=uk to an
> .action link, than the locale is changed, but only for this current
> HTTP request. Next clicks on links cause the default locale to be
> displayed again.
>
> Did anyone experience anything similar to the above?
>
> Thanks,
> Andrew
>
>
> On Nov 30, 2007 4:34 PM, giglian <an...@smurfitkappa.it> wrote:
> >
> > my web app display message in jsp page ( using <s:text name="......."/>)
> > always in one language.
> > I have two localization files (package.properties and package_it.properties
> > in the same folder), and I always get the messages in Italian language even
> > if the client language is English (en-us).
> > Rather in my production environment (O.S. Windows Server 2003 English), the
> > same web app always displaying the same messages in English language even if
> > the client language (IE 6) is Italian (it).
> > I tried to do everythings but with any result.
> > Please help me to solve this issue.
> > Thanks in advance for your time.
> >
> > Andrea

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 2.0.11 localization issue

Posted by Dave Newton <ne...@yahoo.com>.
Please move this discussion to the user list.

Thanks,
Dave

--- giglian <an...@smurfitkappa.it> wrote:

> 
> I tried using the example application
> (struts2-blank-2.0.11.war) and it
> working fine using package_es.properties and
> package.properties, that is I
> getting the messages in the right language. 
> I get the same result using package_fr.properties
> rather than
> package_es.properties. 
> But if I rename the package_es.properties in
> package_it.properties, it did't
> work, that is the messages are always displayed in
> the O.S. language. 
> Anyone can help me? I'm becoming crazy... 
> It seems to be a bug related with the "it" extension
> !!!
> Thank's for your time! 
> 
> Andrea 
> 
> 
> astepanenko wrote:
> > 
> > Hi Dave,
> > 
> > I didn't notice it was sent to dev list. I
> apologise for this.
> > 
> > Andrew
> > 
> > On Dec 1, 2007 1:01 AM, Dave Newton
> <ne...@yahoo.com> wrote:
> >> Please move this discussion over to the
> struts-user
> >> mailing list. Thanks!
> >>
> >> Dave
> >>
> >> --- Andrew Stepanenko
> <an...@gmail.com>
> >> wrote:
> >>
> >>
> >> > I have something similar like this. If I append
> >> > request_locale=uk to a
> >> > JSP there is no effect, and still the default
> locale
> >> > from
> >> > struts.properties is displayed. If I append
> >> > request_locale=uk to an
> >> > .action link, than the locale is changed, but
> only
> >> > for this current
> >> > HTTP request. Next clicks on links cause the
> default
> >> > locale to be
> >> > displayed again.
> >> >
> >> > Did anyone experience anything similar to the
> above?
> >> >
> >> > Thanks,
> >> > Andrew
> >> >
> >> > On Nov 30, 2007 4:34 PM, giglian
> >> > <an...@smurfitkappa.it> wrote:
> >> > >
> >> > > my web app display message in jsp page (
> using
> >> > <s:text name="......."/>)
> >> > > always in one language.
> >> > > I have two localization files
> (package.properties
> >> > and package_it.properties
> >> > > in the same folder), and I always get the
> messages
> >> > in Italian language even
> >> > > if the client language is English (en-us).
> >> > > Rather in my production environment (O.S.
> Windows
> >> > Server 2003 English), the
> >> > > same web app always displaying the same
> messages
> >> > in English language even if
> >> > > the client language (IE 6) is Italian (it).
> >> > > I tried to do everythings but with any
> result.
> >> > > Please help me to solve this issue.
> >> > > Thanks in advance for your time.
> >> > >
> >> > > Andrea
> >> > > --
> >> > > View this message in context:
> >> >
> >>
>
http://www.nabble.com/Struts-2.0.11-localization-issue-tf4913375.html#a14065489
> >> > > Sent from the Struts - Dev mailing list
> archive at
> >> > Nabble.com.
> >> > >
> >> > >
> >> > >
> >> >
> >>
>
---------------------------------------------------------------------
> >> > > To unsubscribe, e-mail:
> >> > dev-unsubscribe@struts.apache.org
> >> > > For additional commands, e-mail:
> >> > dev-help@struts.apache.org
> >> > >
> >> > >
> >> >
> >> >
> >>
>
---------------------------------------------------------------------
> >> > To unsubscribe, e-mail:
> >> > dev-unsubscribe@struts.apache.org
> >> > For additional commands, e-mail:
> >> > dev-help@struts.apache.org
> >> >
> >> >
> >>
> >>
> >>
>
---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
> dev-unsubscribe@struts.apache.org
> >> For additional commands, e-mail:
> dev-help@struts.apache.org
> >>
> >>
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> dev-help@struts.apache.org
> > 
> > 
> > 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/Struts-2.0.11-localization-issue-tf4913375.html#a14128228
> Sent from the Struts - Dev mailing list archive at
> Nabble.com.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> dev-help@struts.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Struts 2.0.11 localization issue

Posted by giglian <an...@smurfitkappa.it>.
I tried using the example application (struts2-blank-2.0.11.war) and it
working fine using package_es.properties and package.properties, that is I
getting the messages in the right language. 
I get the same result using package_fr.properties rather than
package_es.properties. 
But if I rename the package_es.properties in package_it.properties, it did't
work, that is the messages are always displayed in the O.S. language. 
Anyone can help me? I'm becoming crazy... 
It seems to be a bug related with the "it" extension !!!
Thank's for your time! 

Andrea 


astepanenko wrote:
> 
> Hi Dave,
> 
> I didn't notice it was sent to dev list. I apologise for this.
> 
> Andrew
> 
> On Dec 1, 2007 1:01 AM, Dave Newton <ne...@yahoo.com> wrote:
>> Please move this discussion over to the struts-user
>> mailing list. Thanks!
>>
>> Dave
>>
>> --- Andrew Stepanenko <an...@gmail.com>
>> wrote:
>>
>>
>> > I have something similar like this. If I append
>> > request_locale=uk to a
>> > JSP there is no effect, and still the default locale
>> > from
>> > struts.properties is displayed. If I append
>> > request_locale=uk to an
>> > .action link, than the locale is changed, but only
>> > for this current
>> > HTTP request. Next clicks on links cause the default
>> > locale to be
>> > displayed again.
>> >
>> > Did anyone experience anything similar to the above?
>> >
>> > Thanks,
>> > Andrew
>> >
>> > On Nov 30, 2007 4:34 PM, giglian
>> > <an...@smurfitkappa.it> wrote:
>> > >
>> > > my web app display message in jsp page ( using
>> > <s:text name="......."/>)
>> > > always in one language.
>> > > I have two localization files (package.properties
>> > and package_it.properties
>> > > in the same folder), and I always get the messages
>> > in Italian language even
>> > > if the client language is English (en-us).
>> > > Rather in my production environment (O.S. Windows
>> > Server 2003 English), the
>> > > same web app always displaying the same messages
>> > in English language even if
>> > > the client language (IE 6) is Italian (it).
>> > > I tried to do everythings but with any result.
>> > > Please help me to solve this issue.
>> > > Thanks in advance for your time.
>> > >
>> > > Andrea
>> > > --
>> > > View this message in context:
>> >
>> http://www.nabble.com/Struts-2.0.11-localization-issue-tf4913375.html#a14065489
>> > > Sent from the Struts - Dev mailing list archive at
>> > Nabble.com.
>> > >
>> > >
>> > >
>> >
>> ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail:
>> > dev-unsubscribe@struts.apache.org
>> > > For additional commands, e-mail:
>> > dev-help@struts.apache.org
>> > >
>> > >
>> >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail:
>> > dev-unsubscribe@struts.apache.org
>> > For additional commands, e-mail:
>> > dev-help@struts.apache.org
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts-2.0.11-localization-issue-tf4913375.html#a14128228
Sent from the Struts - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Struts 2.0.11 localization issue

Posted by Andrew Stepanenko <an...@gmail.com>.
Hi Dave,

I didn't notice it was sent to dev list. I apologise for this.

Andrew

On Dec 1, 2007 1:01 AM, Dave Newton <ne...@yahoo.com> wrote:
> Please move this discussion over to the struts-user
> mailing list. Thanks!
>
> Dave
>
> --- Andrew Stepanenko <an...@gmail.com>
> wrote:
>
>
> > I have something similar like this. If I append
> > request_locale=uk to a
> > JSP there is no effect, and still the default locale
> > from
> > struts.properties is displayed. If I append
> > request_locale=uk to an
> > .action link, than the locale is changed, but only
> > for this current
> > HTTP request. Next clicks on links cause the default
> > locale to be
> > displayed again.
> >
> > Did anyone experience anything similar to the above?
> >
> > Thanks,
> > Andrew
> >
> > On Nov 30, 2007 4:34 PM, giglian
> > <an...@smurfitkappa.it> wrote:
> > >
> > > my web app display message in jsp page ( using
> > <s:text name="......."/>)
> > > always in one language.
> > > I have two localization files (package.properties
> > and package_it.properties
> > > in the same folder), and I always get the messages
> > in Italian language even
> > > if the client language is English (en-us).
> > > Rather in my production environment (O.S. Windows
> > Server 2003 English), the
> > > same web app always displaying the same messages
> > in English language even if
> > > the client language (IE 6) is Italian (it).
> > > I tried to do everythings but with any result.
> > > Please help me to solve this issue.
> > > Thanks in advance for your time.
> > >
> > > Andrea
> > > --
> > > View this message in context:
> >
> http://www.nabble.com/Struts-2.0.11-localization-issue-tf4913375.html#a14065489
> > > Sent from the Struts - Dev mailing list archive at
> > Nabble.com.
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > dev-unsubscribe@struts.apache.org
> > > For additional commands, e-mail:
> > dev-help@struts.apache.org
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> > dev-help@struts.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Struts 2.0.11 localization issue

Posted by Dave Newton <ne...@yahoo.com>.
Please move this discussion over to the struts-user
mailing list. Thanks!

Dave

--- Andrew Stepanenko <an...@gmail.com>
wrote:

> I have something similar like this. If I append
> request_locale=uk to a
> JSP there is no effect, and still the default locale
> from
> struts.properties is displayed. If I append
> request_locale=uk to an
> .action link, than the locale is changed, but only
> for this current
> HTTP request. Next clicks on links cause the default
> locale to be
> displayed again.
> 
> Did anyone experience anything similar to the above?
> 
> Thanks,
> Andrew
> 
> On Nov 30, 2007 4:34 PM, giglian
> <an...@smurfitkappa.it> wrote:
> >
> > my web app display message in jsp page ( using
> <s:text name="......."/>)
> > always in one language.
> > I have two localization files (package.properties
> and package_it.properties
> > in the same folder), and I always get the messages
> in Italian language even
> > if the client language is English (en-us).
> > Rather in my production environment (O.S. Windows
> Server 2003 English), the
> > same web app always displaying the same messages
> in English language even if
> > the client language (IE 6) is Italian (it).
> > I tried to do everythings but with any result.
> > Please help me to solve this issue.
> > Thanks in advance for your time.
> >
> > Andrea
> > --
> > View this message in context:
>
http://www.nabble.com/Struts-2.0.11-localization-issue-tf4913375.html#a14065489
> > Sent from the Struts - Dev mailing list archive at
> Nabble.com.
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> dev-help@struts.apache.org
> >
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> dev-help@struts.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Struts 2.0.11 localization issue

Posted by Andrew Stepanenko <an...@gmail.com>.
I have something similar like this. If I append request_locale=uk to a
JSP there is no effect, and still the default locale from
struts.properties is displayed. If I append request_locale=uk to an
.action link, than the locale is changed, but only for this current
HTTP request. Next clicks on links cause the default locale to be
displayed again.

Did anyone experience anything similar to the above?

Thanks,
Andrew

On Nov 30, 2007 4:34 PM, giglian <an...@smurfitkappa.it> wrote:
>
> my web app display message in jsp page ( using <s:text name="......."/>)
> always in one language.
> I have two localization files (package.properties and package_it.properties
> in the same folder), and I always get the messages in Italian language even
> if the client language is English (en-us).
> Rather in my production environment (O.S. Windows Server 2003 English), the
> same web app always displaying the same messages in English language even if
> the client language (IE 6) is Italian (it).
> I tried to do everythings but with any result.
> Please help me to solve this issue.
> Thanks in advance for your time.
>
> Andrea
> --
> View this message in context: http://www.nabble.com/Struts-2.0.11-localization-issue-tf4913375.html#a14065489
> Sent from the Struts - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org