xref: /netbsd-src/external/gpl2/gettext/dist/gettext-tools/examples/hello-php/hello.php (revision 946379e7b37692fc43f68eb0d1c10daa0a7f3b6c)
1*946379e7Schristos#!@PHP@ -q
2*946379e7Schristos<?
3*946379e7Schristos  // Example for use of GNU gettext.
4*946379e7Schristos  // Copyright (C) 2003 Free Software Foundation, Inc.
5*946379e7Schristos  // This file is in the public domain.
6*946379e7Schristos  //
7*946379e7Schristos  // Source code of the PHP program.
8*946379e7Schristos
9*946379e7Schristos  setlocale (LC_ALL, "");
10*946379e7Schristos  textdomain ("hello-php");
11*946379e7Schristos  bindtextdomain ("hello-php", "@localedir@");
12*946379e7Schristos
13*946379e7Schristos  echo _("Hello, world!");
14*946379e7Schristos  echo "\n";
15*946379e7Schristos  echo printf (_("This program is running as process number %d."),
16*946379e7Schristos               posix_getpid());
17*946379e7Schristos  echo "\n";
18*946379e7Schristos?>
19