summaryrefslogtreecommitdiff
path: root/gnu/dist/gettext/gettext-tools/examples/hello-php/hello.php
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2005-04-29 14:59:33 +0000
committerchristos <christos@NetBSD.org>2005-04-29 14:59:33 +0000
commit7a27fa0d628db127ef99d5d7693cabac225371a0 (patch)
tree2e20b30dd1880af6997bca68de483c5182c818a7 /gnu/dist/gettext/gettext-tools/examples/hello-php/hello.php
parentf44c5b012e777648a772746694546a82b874ffd5 (diff)
ftp ftp.gnu.org
Diffstat (limited to 'gnu/dist/gettext/gettext-tools/examples/hello-php/hello.php')
-rw-r--r--gnu/dist/gettext/gettext-tools/examples/hello-php/hello.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/gnu/dist/gettext/gettext-tools/examples/hello-php/hello.php b/gnu/dist/gettext/gettext-tools/examples/hello-php/hello.php
new file mode 100644
index 00000000000..bb7f9089b1a
--- /dev/null
+++ b/gnu/dist/gettext/gettext-tools/examples/hello-php/hello.php
@@ -0,0 +1,18 @@
+#!@PHP@ -q
+<?
+ // Example for use of GNU gettext.
+ // Copyright (C) 2003 Free Software Foundation, Inc.
+ // This file is in the public domain.
+ //
+ // Source code of the PHP program.
+
+ setlocale (LC_ALL, "");
+ textdomain ("hello-php");
+ bindtextdomain ("hello-php", "@localedir@");
+
+ echo _("Hello, world!");
+ echo "\n";
+ echo printf (_("This program is running as process number %d."),
+ posix_getpid());
+ echo "\n";
+?>