philip Thu May 9 19:43:59 2002 EDT
Modified files:
/phpdoc/en/reference/gettext/functions gettext.xml
Log:
Added information on using the alias _() for gettext(). And WS.
Index: phpdoc/en/reference/gettext/functions/gettext.xml
diff -u phpdoc/en/reference/gettext/functions/gettext.xml:1.2
phpdoc/en/reference/gettext/functions/gettext.xml:1.3
--- phpdoc/en/reference/gettext/functions/gettext.xml:1.2 Wed Apr 17 02:38:21
2002
+++ phpdoc/en/reference/gettext/functions/gettext.xml Thu May 9 19:43:59 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/gettext.xml, last change in rev 1.2 -->
<refentry id="function.gettext">
<refnamediv>
@@ -15,7 +15,7 @@
<para>
This function returns a translated string if one is found in the
translation table, or the submitted message if not found. You may
- use an underscore character as an alias to this function.
+ use the underscore character '_' as an alias to this function.
</para>
<example>
<title><function>gettext</function>-check</title>
@@ -23,16 +23,19 @@
<![CDATA[
<?php
// Set language to German
-putenv ("LANG=de");
+putenv("LANG=de");
// Specify location of translation tables
-bindtextdomain ("myPHPApp", "./locale");
+bindtextdomain("myPHPApp", "./locale");
// Choose domain
-textdomain ("myPHPApp");
+textdomain("myPHPApp");
// Print a test message
-print (gettext ("Welcome to My PHP Application"));
+print gettext("Welcome to My PHP Application");
+
+// Or use the alias _() for gettext()
+print _("Have a nice day");
?>
]]>
</programlisting>