Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 46706 invoked from network); 2 Apr 2000 21:15:34 -0000 Received: from lukla.sun.com (192.18.98.31) by locus.apache.org with SMTP; 2 Apr 2000 21:15:34 -0000 Received: from centralmail1.Central.Sun.COM ([129.147.62.10]) by lukla.Sun.COM (8.9.3+Sun/8.9.3) with ESMTP id PAA14445 for ; Sun, 2 Apr 2000 15:15:34 -0600 (MDT) Received: from swanaba.central (swanaba.Central.Sun.COM [129.147.30.5]) by centralmail1.Central.Sun.COM (8.9.3+Sun/8.9.3/ENSMAIL,v1.7) with ESMTP id PAA00215 for ; Sun, 2 Apr 2000 15:15:33 -0600 (MDT) Received: from eng.sun.com (swantty [129.147.30.8]) by swanaba.central (8.8.8+Sun/8.8.8) with ESMTP id PAA10011 for ; Sun, 2 Apr 2000 15:13:29 -0600 (MDT) Message-ID: <38E7B828.C264FB1A@eng.sun.com> Date: Sun, 02 Apr 2000 14:14:16 -0700 From: "Craig R. McClanahan" X-Mailer: Mozilla 4.72 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: tomcat-dev@jakarta.apache.org Subject: Re: Internacionalization? References: <80F5674514B4D311BAFC0040F6A45EEE014FBA@ntserver> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N 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 "LocalStrings_es.properties" (if it exists), instead of the default "LocalStrings.properties", and therefore pick up the translated messages. All that's needed is to create translated versions of the LocalStrings.properties files for each of the Java packages. > > Saludos , > Ignacio J. Ortega > Craig McClanahan