In case gettext does not work on Debian systems, have a look at /etc/locale.alias and add the according language (e.g. en_US en_US.ISO-8859-1)
First you have to prepare the program by adding
#include <libintl.h> #define _(String) gettext(String) #define gettext_noop(String) String #define N_(String) gettext_noop(String)
First create a directory ./po in the source directory to hold all the gettext files. Then run the command
$ xgettext -p ./po -o messages.po --language=C --indent --width=80 --keyword=_ *.c
After that is done, a translation can be created like this:
$ cd ./po $ msgmerge de_DE.po messages.po > de_DE_new.po $ msgfmt --check --statistics de_DE.po --output=de_DE.mo