hi, 

1. Did you insert the <param-name>application</param-name> (I guess, yes)?
2. Like you, I have also to deal with different languages (de.ch/fr.ch/it.ch/...you 
know what I mean for CH).
        I just checked my resource files....maybe, you have a problem, because you 
named it ApplicationResources_de-ch.properties instead of 
ApplicationResources_de_ch.properties (note the "_" instead of "-").

Cheers, Marcel


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 31, 2001 3:30 PM
To: [EMAIL PROTECTED]
Subject: problem with i18n


Hello struts-user,

I have a problem with i18n.
I have setup in the web.xml file this
<param-value>ch.netcetera.webapp.struts.ApplicationResources</param-value>
and I added in the ch/netcetera/webapp/struts directory two files:
ApplicationResources.properties
ApplicationResources_de-ch.properties

With jsp I look witch language I use and this is OK. But struts us
ever the ApplicationResources.properties.

<%
  String lang = request.getHeader("Accept-Language");
  out.println(lang);
  boolean headerSuccess = false;
  if (lang != null){
    if (lang.length() >= 2){
      session.putValue(org.apache.struts.action.Action.LOCALE_KEY, new 
java.util.Locale(lang.substring(0, 2), "") );
      headerSuccess = true;
    }
  }
  if (headerSuccess){
    %><bean:message key="index.title" /><%
  }
  else{
    out.println("Header 'Accept-Language' either not found or has no recognisable 
value.");
  }
%>

This jsp code print me always the string key for index.title in the
ApplicationResources.properties.

Have someone a answer to that problem?


-- 
Best regards,
 rgi                          mailto:[EMAIL PROTECTED]


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

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

Reply via email to