Previous: Message catalogs with gettext, Up: The Uniforum approach   [Contents][Index]


8.2.2 Programs to handle message catalogs for gettext

The GNU C Library does not contain the source code for the programs to handle message catalogs for the gettext functions. As part of the GNU project the GNU gettext package contains everything the developer needs. The functionality provided by the tools in this package by far exceeds the abilities of the gencat program described above for the catgets functions.

There is a program msgfmt which is the equivalent program to the gencat program. It generates from the human-readable and -editable form of the message catalog a binary file which can be used by the gettext functions. But there are several more programs available.

The xgettext program can be used to automatically extract the translatable messages from a source file. I.e., the programmer need not take care of the translations and the list of messages which have to be translated. S/He will simply wrap the translatable string in calls to gettext et.al and the rest will be done by xgettext. This program has a lot of options which help to customize the output or help to understand the input better.

Other programs help to manage the development cycle when new messages appear in the source files or when a new translation of the messages appears. Here it should only be noted that using all the tools in GNU gettext it is possible to completely automate the handling of message catalogs. Beside marking the translatable strings in the source code and generating the translations the developers do not have anything to do themselves.