tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: Internacionalization?
Date Sun, 02 Apr 2000 21:14:16 GMT
Nacho wrote:

> Digging into Tomcat code trying to figure out how this code works, i
> have ended (logically) into StringManager and this lines of code:
>     private StringManager(String packageName) {
>                  String bundleName = packageName + ".LocalStrings";
>                  bundle = ResourceBundle.getBundle(bundleName);
>     }
> There is no much internazionalization here :-).
> Where is the global locale for Tomcat? , are there any provisions for
> that?

Tomcat uses the default locale under which it is started (that is, the
Locale returned by Locale.getDefault()).  In my case, this is a US
locale, but it depends on your local machine configuration and how your
JVM decides what to use for a default (for example, with the IBM 1.1.8
JVM on Linux you can set this with an environment variable).

However, if your default locale is Spanish, the
ResourceBundle.getBundle() method will load from a properties file named
"" (if it exists), instead of the default
"", and therefore pick up the translated
messages.  All that's needed is to create translated versions of the files for each of the Java packages.

> Saludos ,
> Ignacio J. Ortega

Craig McClanahan

View raw message