www.delorie.com/gnu/docs/gettext/gettext_13.html   search  
Buy GNU books!

GNU gettext utilities

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3. Preparing Program Sources

For the programmer, changes to the C source code fall into three categories. First, you have to make the localization functions known to all modules needing message translation. Second, you should properly trigger the operation of GNU gettext when the program initializes, usually from the main function. Last, you should identify and especially mark all constant strings in your program needing translation.

Presuming that your set of programs, or package, has been adjusted so all needed GNU gettext files are available, and your `Makefile' files are adjusted (see section 12. The Maintainer's View), each C module having translated C strings should contain the line:

#include <libintl.h>

The remaining changes to your C sources are discussed in the further sections of this chapter.

3.1 Triggering gettext Operations  
3.2 Preparing Translatable Strings  
3.3 How Marks Appear in Sources  
3.4 Marking Translatable Strings  
3.5 Special Comments preceding Keywords  Telling something about the following string
3.6 Special Cases of Translatable Strings  

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003