Try ApplicationResources_de_CH.properties

Format is : BasicBundle + _  + languagecode + _ + countryCode

> -----Original Message-----
> From: rgi [SMTP:[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