You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andy Boyko <ab...@fabgear.com> on 2001/02/07 04:55:24 UTC

Locale differences between Windows & Linux JDK?

I'm seeing a confusing difference in the localized message
resource behavior between the same application running on 
Windows 2000 and on Linux.  

My error messages in the resources file are all non-localized,
and thus not prefixed, but simply named (ie "errors.header").
On a Linux server, messages like errors.header are correctly
looked up and retrieved.  With the same application on a
Windows 2000, the resource is not found, and instead I 
see ???en_US.errors.header??? (with IE 5.5) or 
???en.errors.header??? (with netscape 4.7). 

I thought that perhaps disabling locales using the
ActionServlet init parameter "locale"=false would solve
it, but it had no effect.

Obviously, I would prefer not to have to duplicate my 
messages with the appropriate prefix, and instead for struts 
to fall back to the default unprefixed message if a localized
one is not found.  

I know I'm missing something simple; localization is totally
new to me.  The only obvious thing I thought to check was 
Locale.getDefault(), which returns en_US on both sides.
I hate to ask for a localization (or, really, delocalization :)
primer here, but... um... any suggestions?

It's the same app code on both sides; I'm using Struts 
from cvs, and Sun JDK 1.3 on Red Hat 6.2
with Apache 1.3/Resin 1.2.2, and Windows 2000 with just 
Resin 1.2.2.

Andy Boyko   aboyko@fabgear.com

RE: Locale differences between Windows & Linux JDK? NEVERMIND; SORRY

Posted by Andy Boyko <ab...@fabgear.com>.
> I'm seeing a confusing difference in the localized message
> resource behavior between the same application running on 
> Windows 2000 and on Linux.  

Oh, jeez.  I'm embarrassedly, sheepishly sorry - as usual,
when things seem fundamentally broken, check the obvious stuff
first.  The only problem here was with my build process, which 
wasn't copying the message resource file from my source tree
into my webapp dir.  Cross-platform development always
sounds like a better idea than it is.   

Andy Boyko    aboyko@fabgear.com