[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Locales and Java



On Tue, Feb 12, 2002 at 10:31:25PM +0100, Andreas von Heydwolff wrote:
| >The 're' directory is for the "JRE" (Java Runtime Environment).  It is
| >all you need to _run_ java programs.  The "sdk" directory is for the
| >"SDK" (Software Development Kit) which is needed only if you want to
| >develop java programs (eg compile from source).
| >
| >| Should I just put the jars into the latter dir, or create the path you 
| >| mentioned?
| >
| >Either set $LANG to something that the app can handle, or make a
| >resource bundle (a file named
| >com/ibm/.../<basename>_<country code>.properties) in the CLASSPATH.
| 
| Thanks! I guess I will do the first. The secons seems to be beyond my 
| skills. Or it there some HowTo page I could use?

Either fix will work just as well (unless you actually translate the
messages in the properties file for the second option, in which case
you'll get native-language messages).


If I assume that the program is in "theprog.jar" and that the
resource bundle it is looking for is "/com/ibm/theprog/thedata" and
that it has a "en" version, try this :

$ mkdir /tmp/fix
$ cd /tmp/fix
$ jar -xvf /usr/share/java/theprog.jar
$ cp com/ibm/theprog/thedata_en.properties com/ibm/theprog/thedata_co.properties
        # replace 'co' with your country code
$ jar -cvf theprog.jar *
$ su root
# mv /usr/share/java/theprog.jar /usr/share/java/theprog_orig.jar
# cp theprog.jar /usr/share/java/theprog.jar


It is just a matter of sticking the properties file in the jar file.
The 'jar' program works much like 'tar' does (though the file format
is "zip" with the addition of some specially named files).

HTH,
-D

-- 

The crucible for silver and the furnace for gold,
but the Lord tests the heart.
        Proverbs 17:3



Reply to: