       ifhp, Internationalization and gettext 
              Patrick Powell
         Sun Aug 20 15:50:24 PDT 2000

Internationalization in ifhp is done using the gettext
packages.   There are three possibilities to use this
functionality:

a)  no internationalization (default)
      ./configure
b)  nationalization if system supports it and gettext installed
    on your system:
      ./configure --enable-nls
c)  installating and compiling the gettext support library
    as part of ifhp:
      ./configure --enable-nls --with-included-gettext

If your system does not have the gettext code installed,
then you can simply install the necessary libraries as
described below.  This installation is based on the
gettext-0.10.35 distribution.  The following dependencies
on the gettext distribution are known:

  a)  the aclocal.m4 file uses the configure macros from the gettext
     distribution.  These macros set the following variables
     that are used in the configure script:

     USE_NLS = yes or no  - if NLS is enabled
     USE_INCLUDED_LIBINTL = yes or no
       if yes, then INTLLIBS=intl/libintl.a
       otherwise we set INTLLIBS=-lintl.a

   The default has been changed to NO nls support.
   This is done by changing:

    AC_ARG_ENABLE(nls,
      [  --disable-nls           do not use Native Language Support],
      USE_NLS=$enableval, USE_NLS=yes)

    to:

    AC_ARG_ENABLE(nls,
      [  --enable-nls           use Native Language Support],
      USE_NLS=$enableval, USE_NLS=no)


  b)  the intl/Makefile.in.in has been modified so that we have:
    localedir=@LOCALEDIR@ 

    If you replace this file with new version, you MUST update
    this so the correct location is used for the locale information.

How to Install the gettext software:

1. Get the gettext distribution and install it on your local system

   ftp://prep.ai.mit.edu/pub/gnu/gettext-<version>

   Unpack it by using:

    tar zxvf gettext-<version>.tgz
    cd gettext-<version>

   Read the documentation.  It is pretty straight forward with
   respect to installation.

2. If you want to install the distribution on your system,
   to use option a) above:

   Configure, make and install the distribution.  You should
   use the following options so that compilation will succeed.

        tar zxvf gettext-<version>.tgz
        cd gettext-<version>
        ./configure --prefix=/usr --with-included-gettext
        make
        su
        make install

   Now reconfigure and remake ifhp:
        cd .../ifhp
        rm -f config.cache
        configure

3. If you do not want to install the gettext distribution
   on your system, you will have to do a bit more work.

   First unpack the distribution.

        tar zxvf gettext-<version>.tgz
        cd gettext-<version>

   Now copy the intl directories and contents
   to ifhp/intl and ifhp/po respectively:

        cd gettext-<version>
        tar cf - intl | (cd ..../ifhp; tar xvf -)

   At this point you can now use c) with ifhp

        cd .../ifhp
        rm -f config.cache
        ./configure --with-included-gettext ....

4. If there has been a major update in the gettext distributution
   then you may need to resinstall the po/Makefile.in.in file
   as well.  You can simply copy the Makefile.in.in file from
   the new gettext distribution to the po directory. After this,
   you should modify the Makefile.in.in so that it has
      localedir=@LOCALEDIR@
   This will make sure that the ifhp installation and the gettext
   code will use the same places for the translation files:
     cp .../gettext-<version>/po/Makefile.in.in /tmp
     cd .../ifhp
     cp /tmp/Makefile.in.in po
     edit po/Makefile.in.in and set localedir as described above
     configure

   You should also update the aclocal.m4 macros with the latest version.
   You can do this by the following steps:
   
   cp aclocal.m4 aclocal.bak
   cp aclocal.m4 aclocal.tmp
   edit aclocal.m4 and truncate it at the start of the NLS macros
     ....
        #  NLS Support
     .... (truncate after the comments)

   then concatenate the new gettext aclocal macros to the end
   of this file:
   cat aclocal.tmp .../aclocal/* >aclocal.m4

   Edit the new aclocal.m4 and change:

    AC_ARG_ENABLE(nls,
      [  --disable-nls           do not use Native Language Support],
      USE_NLS=$enableval, USE_NLS=yes)

    to:

    AC_ARG_ENABLE(nls,
      [  --enable-nls           use Native Language Support],
      USE_NLS=$enableval, USE_NLS=no)

