| GNU gettext for Delphi, C++ Builder and Kylix 1.2 beta | ||
|---|---|---|
| <<< Previous | API reference | Next >>> |
This function is identical to gettext(), except that it looks up translations in the text domain that is specified as the first parameter. You should always specify a string literal as first parameter - don't use variable names etc.:
LanguageList.Add(dgettext('languagenames','Danish')); |
In this example, Danish is looked up in languagenames.mo. During extraction of strings from Delphi/ObjectPascal source code, 'Danish' will be put into languagenames.po.
![]() | Special note for C/C++ programmers |
|---|---|
The string extraction tool that is used for C and C++ source code extracts differently than the extraction tool for ObjectPascal source code. In the example above, the string 'Danish' will be put in the main default.po file, mixing everything up. |
For further information on this subject, please see the Section called function gettext(msg:widestring):widestring;>.
| <<< Previous | Home | Next >>> |
| function gettext(msg:widestring):widestring; | Up | function ngettext(const singular,plural:widestring;Number:longint):widestring; |