/*-------------- GNU gettext version 0.10.35 ---------------------------*/ This file, README-gettext.os2, is first written by Hung-Chi Chu who \ ported GNU getext to OS/2. Chu's original document is as follows. > * This is GNU gettext-0.10.35 ported to emx-0.9c/os2. > * The library is compiled with -Zmt flag. > * The default locale directory is set by "GNULOCALEDIR" env variable. > * The source code can be got from > ftp://alpha.gnu.ai.mit.edu/gnu/gettext-0.10.35.tar.gz > > -- > Hung-Chi Chu With his work I was able to internationalize GNU file utilities, GNU shell utilities, GNU text utilities, GNU shar utilities, GNU enscript, and a2ps. Modifications on his work are: 1. JAPANESE shift JIS code is accepted by `msgfmt.exe', when the 1st two letters of a PO file name is just "ja". d:\src\xx> msgfmt ja.po > ja.gmo 2. Makefile for `intl.dll' is changed to make two types of dynamic link libraries. One for `-Zmt', anothor for `-Zst'. intl_d.dll, insl_d.a, intl_d.lib intl_s.dll, insl_s.a, intl_s.lib Jun Sawataishi COMPILATION ENVIRONMENT ----------------------- OS/2 version 4 gcc version pgcc-2.91.60 19981201 (egcs-1.1.1 release) emx 0.9d with fix01 REQUIRED RESOURCES ----------------- emx runtime version 0.9d ftp://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/emxrt.zip ftp://ftp.leo.org/pub/comp/os/os2/leo/gnu/emx+gcc/emxrt.zip Intel 586 (PENTIUM) or later CPU INSTALLATION ------------ Copy executables and DLLs \> unzip os2_gettext-0.10.35 \> cd gettext-0.10.35 gettext-0.10.35\> copy bin\*.exe SOMEWHERE_IN_PATH_DIRECTORY gettext-0.10.35\> copy dll\*.dll SOMEWHERE_IN_LIBPATH_DIRECTORY Install message files If you'd like to install them in `g:\emx', do like this. gettext-0.10.35\> mkdir g:\emx\share gettext-0.10.35\> mkdir g:\emx\share\locale gettext-0.10.35\> xcopy /s share\locale\* g:\emx\share\locale Now you MUST set environmental variable `GNULOCALEDIR' in your `config.sys'. set GNULOCALEDIR=g:/emx/share/locale Should not use `\' for `GNULOCALEDIR'. Befor reboot your machine, test gettext in command line. (Be sure that *.exe and *.dll has been installed) gettext-0.10.35\> set GNULOCALEDIR=g:/emx/share/locale gettext-0.10.35\> set LANGUAGE=fr gettext-0.10.35\> gettext --help You will see French messages gettext-0.10.35\> set LANGUAGE=de gettext-0.10.35\> gettext --help Now German messages will appear To know what kind of languages are prepared for GNU gettext executables do like this. gettext-0.10.35\> dir /s g:\emx\share\locale\gettext.mo If tests are successful, reboot your machine. SETUP LANGUAGE -------------- Specify an environmental variable `LANGUAGE' in your `config.sys' or command shell. I recompiled a lot of GNU utilities with gettext. For example, message files for GNU text utilities locate like this. g:\emx\\share\locale\fr\LC_MESSAGES\fr\textutils.mo g:\emx\\share\locale\fr\LC_MESSAGES\ja\textutils.mo g:\emx\\share\locale\fr\LC_MESSAGES\it\textutils.mo ..................... With "set LANGUAGE=ja", help messages of `cat.exe' is Japanese "LANGUAGE=it" let it procude Italian messages. Good way to test many kinds of language is to use one of GNU shell utilities `env.exe'. \> env LANGUAGE=it cat --help \> env LANGUAGE=ja cat --help \> env LANGUAGE=fr cat --help DOCUMENTATIONS -------------- Important documentations and Texinfo manual are in `gettext-0.10.35\doc'. If you do not have installed Texinfo for Info mannual, gettext.info, the newest version can be get from my web page. http://member.nifty.ne.jp/jsawa/os2_texinfo-3.12h.zip (README for OS/2 is written in English) SIMPLE USAGE ------------ For me, most frequently used executable is `msgfmt.exe', which convert plain text message files, *.po, to binary format MO files, *.gmo. Mo files are read by programs linked with `intl_{s,d}.dll'. If you have a PO file, x.po, without its PO file, do like this. \> msgfmt -o x.gmo x.po When you'd like to convert a Japanese Shift JIS PO file to a MO file, let its name start with "ja". (cf. ja.po) FOR JAPANESE USERS ------------------ If you want to let your program display JAPANESE shift JIS message, simply write a PO file for the program, make MO file, and link a program with gettext library. You can use PO files of EUC code written by Japenese Linux or FreeBSD contributors. All you have to do is: Convert EUC PO files to shift JIS using KANJI CODE converters (nkf.exe). Remake MO files with `msgfmt.exe' Install them in the directory specified by `GNULOCALEDIR' I got a Japanized Linux distribution, `vine' version 1. This distribution is consisted of RPM package (binary format of Red Hat). OS/2 ported `rpm.exe' can be get from my web page. http://www2s.biglobe.ne.jp/~vtgf3mpr/linux/rpm.htm With `rpm.exe', I extracted Japanse EUC coded PO files for GNU utilities. Converting them to shift JIS and installling them was of little effort. Now my command line environment is almost the same as Japanized Linux environment. MAKE FROM SOURCE ---------------- OS/2 ported Unix like shell is required. ftp.leo.org/pub/comp/os/os2/leo/shells/pdksh-5.2.13-emx.zip Obtain a source package `gettext-0.10.35.tar.gz'. ftp: alpha.gnu.ai.mit.edu/gnu/ or its mirror sites CDROM: Recent Linux or FreeBSD distribution which contains it. Untar and patch \> tar zxvf gettext-0.10.35.tar.gz \> cd gettext-0.10.35 gettext-0.10.35\> attrib /s -r * (chmod +rw -R *) gettext-0.10.35\> gzip -dc SOMEWHERE/gettext-0.10.35.diff.gz | patch -p1 Setup Unix-like shell `sh.exe' (of pdksh) gettext-0.10.35\> mkdir \bin gettext-0.10.35\> copy SOMEWHERE\sh.exe \bin gettext-0.10.35\> make gettext-0.10.35\> make check gettext-0.10.35\> make test gettext-0.10.35\> make install prefix=YOUR_CHOICE If you installed emx 0.9d in `g:/emx', dirctories, `g:/emx/dll/', `g:/emx/lib/', and 'g:/emx/bin/' may exist. In this cae "YOUR_CHOICE" should be `g:/emx'. About two kind of library intl_d.dll, intl_d.a intl_d.lib ; for '-Zmt[d]' option of gcc. intl_s.dll, intl_s.a intl_s.lib ; for without '-Zmt[d]' option of gcc. If you make a executable with "gcc -Zmtd ..." and link `intl_s.a' or `intl_s.lib', compilation error do not occur. But national language support is not available for the program. That' all. Comments, suggestions, or requests are always wellcome. Happy computing life with OS/2!! 1999/6/16 Jun Sawataishi, YOKOHAMA, JAPAN http://www2s.biglobe.ne.jp/~vtgf3mpr/indxos2.htm