procedure AddDomainForResourceString (domain:string);
The initialization section of the gnugettext unit hooks into several
Delphi runtime functions and replaces those functions. One of the functions
that are replaced, is the function LoadResString, which retrieves resourcestring
strings from the resource-part of the .exe file. The replacement first finds
the string from the resource-part of the .exe file, and then translates it
using the 'default' text domain. You can instruct the system to search for a translation in
other text domains, too, if it isn't found in the default text domain, by
using this procedure. Simply write this to make LoadStr search delphi.mo,
too, if it isn't found in default.mo:
AddDomainForResourcestring ('delphi'); |