function dgettext(Domain: string; MsgId: widestring): widestring;

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.

NoteSpecial 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;>.