Mail Archives: djgpp-workers/2000/04/21/02:43:00
I think there's a need to discuss the way we want gettext to work with
DJGPP ports. Let me begin this discussion by presenting the problem
and the possible solutions.
Gettext works by providing, for each package, a catalog of strings
used by that package. For each supported language FOO, there is a
corresponding FOO.po file (e.g., de.po for German, ko.po for Korean,
pt.po for Portuguese, etc.) which holds translations of each of these
strings to that language. At run time, a special function is called
to translate each string before it is printed, by looking up the
translation in the corresponding .po file.
The problem is that the *.po files distributed with GNU packages are
encoded using coding schemes used on Unix systems, which are different
from the DOS codepages. For example, West-European languages usually
come in the ISO 8859-1 encoding, which is different from the
corresponding DOS codepage 851.
It is possible to convert the *.po files to DOS codepages, e.g. using
the `recode' program. However, this conversion should be done
manually by each user, since the Makefile's supplied by the GNU
packages don't have provisions for running any such programs when you
say "make install".
Another possibility is to perform the translation on the fly, at run
time. This would mean we need to augment the gettext sources with
additional code that would convert all non-ASCII characters from their
Unix encoding to the corresponding DOS encoding. One possible way to
get this code for free is to link against librecode.a which is part of
the `recode' package.
I favor the second alternative, but it means some additional work on
the gettext port.
Any comments are welcome.
- Raw text -