[Top][All Lists]

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

Re: lynx-dev gettext() question #2

From: Doug Kaufman
Subject: Re: lynx-dev gettext() question #2
Date: Sun, 15 Nov 1998 17:52:34 -0800 (PST)

On Mon, 16 Nov 1998, Nelson Henry Eric wrote:

> What more is necessary?  (I have not gotten an answer as to how gettext is
> going to affect ports other than un*x, e.g., DOS, Win32, Mac, OS/2, VMS.)

I don't know how this will affect the DOS port. I do know that
gettext has been ported to DJGPP, with precompiled binaries available
in addition to the source code. It will make it more difficult
for individuals to compile, since there will be the extra step of
obtaining, installing, and configuring gettext prior to compiling
lynx. The following are excerpts from the README.dj2 file that comes
with the port, noting some differences from the standard gettext. I
haven't used the programs yet.

This is a port of gettext 0.10.32 (a beta release) to DJGPP 2.x.

The configure script has been patched to support MS-DOG (ie ';' is used as
 path separator, test -x is used to find programs, and the .exe versions
 of test programs are run).

The following things are different from the standard gettext distribution.

1] text/binary file handling (the usual MSDOS change). Those of you who, like
   me, prefer to use Unix-style text files, should use 'make UnixText=yes'
   in the src/ subdirectory. This causes the gettext tools to write .po files
   in binary mode (ie Unix-style).

2] besides "-", "/dev/stdout", and "/dev/stdin", "con" is now also used as

3] LOCALE_ALIAS_PATH now uses ';' as path seperator (another MSDOSism).

4] The gettext() function of the libintl library normally conflicts with
   DJGPP's gettext function (from conio.h). This conflict was removed, but
   this means you'll need to use Gettext(), gettext__(), or the convenient
   _() instead.
   xgettext was extended to recognise the above keywords, as well as N_() (an 
   alias for gettext_noop()).
   xgettext now uses the timezone zone string (eg "EST") in POT-Creation-Date
   instead of a numeric offset from GMT.

5] All message catalogs are generated by default. Use 'make LINGUAS="xx yy zz"'
   in the po/ subdirectory to generate only, and

6] The main difference is the use of LOCALEDIR, GNULOCALEDIR and
   LOCALE_ALIAS_PATH. In the standard gettext distribution, these are #defines,
   so the paths are fixed at compilation. Although this is perfectly acceptable
   on a Unix system, on MSDOS this is a severe pain in the rear. This version
   of gettext will set the default location according to your DJDIR environment
   variable (usually set in djgpp.env); at startup, any program using the
   libintl library will look for environment variables before defaulting to the
   path that was compiled in. This should ensure that files are found on any
   DJGPP system, regardless of the drive and directory structure.

   The environment variables used are (note: $X == %X%):
   * for LOCALEDIR:
     1) $LOCALEDIR
     2) $DJDIR     ($DJDIR/share/locale to be precise).
     2) $LOCALEDIR
     3) $DJDIR     ($DJDIR/share/locale to be precise).
     2) $ALIASPATH
     3) If any of $GNULOCALEDIR, $LOCALEDIR or $DJDIR are set, it will combine
        those (in this order) and "." to form its path.

   Message catalogs (.mo files) should go in a xx/LC_MESSAGES
   subdirectory of LOCALEDIR, where xx is the language of the messages (in the
   above example, gettext's Dutch messages (po/ should be placed in
   C:/Unix/Programming/Djgpp/share/locale/nl/LC_MESSAGES/ as

Doug Kaufman
Internet: address@hidden (preferred)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]