3. Incorporating i18n into the package's build infrastructure

So, after all the work in the previous section, you should now be at a point where you can alter your build system to incorporate all of the internationalisation changes. The changes to the build system provide functionality that falls into three loose categories.

I will assume that your package utilises the standard build method of running an autogen.sh script to run aclocal, autoheader, autoconf and automake. All of the changes you need to make in this section and the following ones are to your configure.in file(s) and to some of your Makefile.am files.

The i18n support in GNOME relies heavily on the intltool tool, written by Darin Adler, Maciej Stachowiak and Kenneth Christiansen. It essentially extends the functionality of GNU gettext to include things like desktop files, Glade and Gconf support files, XML files, and a few other types that are not in common usage any longer. You only need intltool when you are building a package from the autogen.sh level. Distributed tarballs contain a copy of the relevant scripts and so do not require intltool on the users' machines.

Note

If you are writing a very low-level library that does not require the extra functionality of intltool, it may be possible to just use gettext in your application. However, at present, this tutorial does not cover this option, since intltool adds very little overhead and is easy to use.