Install gettext-0.18.1.1.tar.gz
[msysgit.git] / mingw / share / doc / gettext / examples / hello-perl / hello-1.pl.in
blob0b16c8e4c50e1896e04e632642072f69c60b0d56
1 #!@PERL@
2 # Example for use of GNU gettext.
3 # This file is in the public domain.
5 # Source code of the Perl program, using the Locale::Messages API.
7 use Locale::Messages qw (textdomain bindtextdomain gettext);
8 use POSIX qw(getpid);
10 binmode STDOUT, ':raw'; # Needed to make it work in UTF-8 locales in Perl-5.8.
12 sub _ ($) { &gettext; }
14 textdomain "hello-perl";
15 bindtextdomain "hello-perl", "@localedir@";
17 print _"Hello, world!";
18 print "\n";
19 printf _"This program is running as process number %d.", getpid();
20 print "\n";