xref: /netbsd-src/external/gpl2/gettext/dist/gettext-tools/examples/hello-pascal/hello.pas (revision 946379e7b37692fc43f68eb0d1c10daa0a7f3b6c)
1*946379e7Schristos { Example for use of GNU gettext.
2*946379e7Schristos   Copyright (C) 2003 Free Software Foundation, Inc.
3*946379e7Schristos   This file is in the public domain.
4*946379e7Schristos 
5*946379e7Schristos   Source code of the Pascal program.  }
6*946379e7Schristos 
7*946379e7Schristos program hello;
8*946379e7Schristos {$mode delphi}
9*946379e7Schristos 
10*946379e7Schristos uses gettext,  { translateresourcestrings }
11*946379e7Schristos      linux,    { getpid }
12*946379e7Schristos      sysutils; { format }
13*946379e7Schristos 
14*946379e7Schristos resourcestring
15*946379e7Schristos   hello_world = 'Hello, world!';
16*946379e7Schristos   running_as = 'This program is running as process number %d.';
17*946379e7Schristos 
18*946379e7Schristos begin
19*946379e7Schristos   translateresourcestrings({$i %LOCALEDIR%}+'/%s/LC_MESSAGES/hello-pascal.mo');
20*946379e7Schristos   writeln(hello_world);
21*946379e7Schristos   writeln(format(running_as,[getpid]));
22*946379e7Schristos end.
23