You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by rohit dige <ri...@yahoo.com> on 2006/10/08 22:10:38 UTC

Struts Internationalization doesn't work on Linux

I need to show a text message on JSP page in browser's
preferred language. I have created multiple language
specific properties files and put them 
 under WEB-INF/classes/config. My JSP and
Struts-config.xml look as following

Struts-Config.xml
----------------
<message-resources
parameter="config.ApplicationResources" null="false"/>

 

JSP file
--------

<%@ page contentType=”text/html; charset=UTF-8”
pageEncoding=”UTF-8” %>

<html>

<head>

<meta http-equiv=”content-type” content=”text-html;
charset=utf-8”>

</head>

<body>
<html:html locale=”true” />
<bean:message key="mykey"/>
</body>
</html>


It shows text in browser preffered language on
Windows. But on Linux, it  does not load the correct
ApplicationResources.properties file - it loads the 
default one, instead of one for a locale (regardless
of 
whether it is language only or language and country).
Do we need any extra configuration on Linux to make it
work? Your help is greatly appreciated.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: Struts Internationalization doesn't work on Linux

Posted by rohit dige <ri...@yahoo.com>.
Hey Martin,

Thank you so much for your response. We are using
RHEL.  
i18n settings in RHEL are configured in
/etc/sysconfig/i18n, and the LANG parameter specifies
LANG="en_US.UTF-8". But this problem still exists. Am
I missing anything else?

Thank you,
Krishna



--- Martin Gainty <mg...@hotmail.com> wrote:

> for RH check your initdb.i18n 
> file for the LANG parameter
> make sure the LANG parameter specifies
> LANG="en_US.UTF-8"
> 
> Anyone else?
> Martin--
> 
> This e-mail communication and any attachments may
> contain confidential and privileged information for
> the use of the 
> designated recipients named above. If you are not
> the intended recipient, you are hereby notified that
> you have received
> this communication in error and that any review,
> disclosure, dissemination, distribution or copying
> of it or its 
> contents
> 
> ----- Original Message ----- 
> From: "rohit dige" <ri...@yahoo.com>
> To: <us...@struts.apache.org>
> Sent: Sunday, October 08, 2006 4:10 PM
> Subject: Struts Internationalization doesn't work on
> Linux
> 
> 
> >I need to show a text message on JSP page in
> browser's
> > preferred language. I have created multiple
> language
> > specific properties files and put them 
> > under WEB-INF/classes/config. My JSP and
> > Struts-config.xml look as following
> > 
> > Struts-Config.xml
> > ----------------
> > <message-resources
> > parameter="config.ApplicationResources"
> null="false"/>
> > 
> > 
> > 
> > JSP file
> > --------
> > 
> > <%@ page contentType="text/html; charset=UTF-8"
> > pageEncoding="UTF-8" %>
> > 
> > <html>
> > 
> > <head>
> > 
> > <meta http-equiv="content-type"
> content="text-html;
> > charset=utf-8">
> > 
> > </head>
> > 
> > <body>
> > <html:html locale="true" />
> > <bean:message key="mykey"/>
> > </body>
> > </html>
> > 
> > 
> > It shows text in browser preffered language on
> > Windows. But on Linux, it  does not load the
> correct
> > ApplicationResources.properties file - it loads
> the 
> > default one, instead of one for a locale
> (regardless
> > of 
> > whether it is language only or language and
> country).
> > Do we need any extra configuration on Linux to
> make it
> > work? Your help is greatly appreciated.
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> > http://mail.yahoo.com 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> > 
> >


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: Struts Internationalization doesn't work on Linux

Posted by Martin Gainty <mg...@hotmail.com>.
for RH check your initdb.i18n 
file for the LANG parameter
make sure the LANG parameter specifies
LANG="en_US.UTF-8"

Anyone else?
Martin--

This e-mail communication and any attachments may contain confidential and privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its 
contents

----- Original Message ----- 
From: "rohit dige" <ri...@yahoo.com>
To: <us...@struts.apache.org>
Sent: Sunday, October 08, 2006 4:10 PM
Subject: Struts Internationalization doesn't work on Linux


>I need to show a text message on JSP page in browser's
> preferred language. I have created multiple language
> specific properties files and put them 
> under WEB-INF/classes/config. My JSP and
> Struts-config.xml look as following
> 
> Struts-Config.xml
> ----------------
> <message-resources
> parameter="config.ApplicationResources" null="false"/>
> 
> 
> 
> JSP file
> --------
> 
> <%@ page contentType="text/html; charset=UTF-8"
> pageEncoding="UTF-8" %>
> 
> <html>
> 
> <head>
> 
> <meta http-equiv="content-type" content="text-html;
> charset=utf-8">
> 
> </head>
> 
> <body>
> <html:html locale="true" />
> <bean:message key="mykey"/>
> </body>
> </html>
> 
> 
> It shows text in browser preffered language on
> Windows. But on Linux, it  does not load the correct
> ApplicationResources.properties file - it loads the 
> default one, instead of one for a locale (regardless
> of 
> whether it is language only or language and country).
> Do we need any extra configuration on Linux to make it
> work? Your help is greatly appreciated.
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>