Creating po files

Instead of typing the whole po file yourself, you can create it by scanning the source code. There are several ways of doing that:

These scanners are very advanced. They don't pick up every string they find in a .pas file - only the strings that are surrounded by calls to gettext() and similar functions. This means that in this example, the string will not be extracted:

 a:='Hello, World';
 a:=gettext(a);

Actually, the system will give a warning that a is unknown. But in this example, it will get extracted:

 a:=gettext('Hello, World');

This means that each single string has to be put in between the ( ) of the function call. In order to save you some typing, an alias for gettext() has been made, and is named _(). The above example can there also be written this way:

 a:=_('Hello, World');

In order to have access to this function, you must include gnugettext.pas in your Delphi or C++ Builder project. This file is part of the installation.