gnuGettextInit.pas 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. (* Delphi-Unit -
  2. Initialization for GnuGetText
  3. =============================
  4. © Dr. J. Rathlev, D-24222 Schwentinental (kontakt(a)rathlev-home.de)
  5. The contents of this file may be used under the terms of the
  6. Mozilla Public License ("MPL") or
  7. GNU Lesser General Public License Version 2 or later (the "LGPL")
  8. Software distributed under this License is distributed on an "AS IS" basis,
  9. WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
  10. the specific language governing rights and limitations under the License.
  11. Vers. 1 - July 2023
  12. last mdified: July 2023
  13. *)
  14. unit GnuGetTextInit;
  15. interface
  16. // InitTranslation has to be placed in the project file before "Application.Initialize"
  17. // "Domains" is a list of all po/mo files needed by the application
  18. // Calling sample: InitTranslation(['delphi10','indy10']);
  19. procedure InitTranslation (const Domains : array of string);
  20. implementation
  21. uses GnuGetText;
  22. { ------------------------------------------------------------------- }
  23. // InitTranslation has to be placed in the project file before "Application.Initialize"
  24. procedure InitTranslation (const Domains : array of string);
  25. var
  26. i : integer;
  27. begin
  28. for i:=0 to High(Domains) do AddDomainForResourceString(Domains[i]);
  29. end;
  30. end.