Go to the first, previous, next, last section, table of contents.


Invoking the gettextize Program

Some files are consistently and identically needed in every package internationalized through GNU gettext. As a matter of convenience, the gettextize program puts all these files right in your package. This program has the following synopsis:

gettextize [ option... ] [ directory ]

and accepts the following options:

`-c'
`--copy'
Copy the needed files instead of making symbolic links. Using links would allow the package to always use the latest gettext code available on the system, but it might disturb some mechanism the maintainer is used to apply to the sources. Because running gettextize is easy there shouldn't be problems with using copies.
`-f'
`--force'
Force replacement of files which already exist.
`-h'
`--help'
Display this help and exit.
`--version'
Output version information and exit.

If directory is given, this is the top level directory of a package to prepare for using GNU gettext. If not given, it is assumed that the current directory is the top level directory of such a package.

The program gettextize provides the following files. However, no existing file will be replaced unless the option --force (-f) is specified.

  1. The `ABOUT-NLS' file is copied in the main directory of your package, the one being at the top level. This file gives the main indications about how to install and use the Native Language Support features of your program. You might elect to use a more recent copy of this `ABOUT-NLS' file than the one provided through gettextize, if you have one handy. You may also fetch a more recent copy of file `ABOUT-NLS' from Translation Project sites, and from most GNU archive sites.
  2. A `po/' directory is created for eventually holding all translation files, but initially only containing the file `po/Makefile.in.in' from the GNU gettext distribution. (beware the double `.in' in the file name). If the `po/' directory already exists, it will be preserved along with the files it contains, and only `Makefile.in.in' will be overwritten.
  3. A `intl/' directory is created and filled with most of the files originally in the `intl/' directory of the GNU gettext distribution. Also, if option --force (-f) is given, the `intl/' directory is emptied first.

If your site support symbolic links, gettextize will not actually copy the files into your package, but establish symbolic links instead. This avoids duplicating the disk space needed in all packages. Merely using the `-h' option while creating the tar archive of your distribution will resolve each link by an actual copy in the distribution archive. So, to insist, you really should use `-h' option with tar within your dist goal of your main `Makefile.in'.

It is interesting to understand that most new files for supporting GNU gettext facilities in one package go in `intl/' and `po/' subdirectories. One distinction between these two directories is that `intl/' is meant to be completely identical in all packages using GNU gettext, while all newly created files, which have to be different, go into `po/'. There is a common `Makefile.in.in' in `po/', because the `po/' directory needs its own `Makefile', and it has been designed so it can be identical in all packages.


Go to the first, previous, next, last section, table of contents.