1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.20 $ -->
<reference id="ref.gettext">
<title>Gettext</title>
<titleabbrev>gettext</titleabbrev>
<partintro>
<simpara>
The gettext functions implement a NLS (Native Language Support)
API which can be used to internationalize your PHP applications.
Please see the gettext documentation from your system for a thorough
explanation of these functions.
</simpara>
</partintro>
<refentry id="function.bindtextdomain">
<refnamediv>
<refname>bindtextdomain</refname>
<refpurpose>Sets the path for a domain</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>bindtextdomain</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
</methodsynopsis>
<para>
The <function>bindtextdomain</function> function sets the path
for a domain.
</para>
</refsect1>
</refentry>
<refentry id='function.bind-textdomain-codeset'>
<refnamediv>
<refname>bind_textdomain_codeset</refname>
<refpurpose>
Specify the character encoding in which the messages from the
DOMAIN message catalog will be re turned
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>bind_textdomain_codeset</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>codeset</parameter></methodparam>
</methodsynopsis>
<para>
&warn.undocumented.func;
</para>
</refsect1>
</refentry>
<refentry id="function.dcgettext">
<refnamediv>
<refname>dcgettext</refname>
<refpurpose>Overrides the domain for a single lookup</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>dcgettext</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>message</parameter></methodparam>
<methodparam><type>int</type><parameter>category</parameter></methodparam>
</methodsynopsis>
<para>
This function allows you to override the current domain for a
single message lookup. It also allows you to specify a category.
</para>
</refsect1>
</refentry>
<refentry id='function.dcngettext'>
<refnamediv>
<refname>dcngettext</refname>
<refpurpose>Plural version of dcgettext() Plural version of dcgettext</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>dcngettext</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>msgid1</parameter></methodparam>
<methodparam><type>string</type><parameter>msgid2</parameter></methodparam>
<methodparam><type>int</type><parameter>n</parameter></methodparam>
<methodparam><type>int</type><parameter>category</parameter></methodparam>
</methodsynopsis>
<para>
&warn.undocumented.func;
</para>
</refsect1>
</refentry>
<refentry id="function.dgettext">
<refnamediv>
<refname>dgettext</refname>
<refpurpose>Override the current domain</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>dgettext</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>message</parameter></methodparam>
</methodsynopsis>
<para>
The <function>dgettext</function> function allows you to override
the current domain for a single message lookup.
</para>
</refsect1>
</refentry>
<refentry id='function.dngettext'>
<refnamediv>
<refname>dngettext</refname>
<refpurpose>Plural version of dcgettext() Plural version of dgettext</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>dngettext</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>msgid1</parameter></methodparam>
<methodparam><type>string</type><parameter>msgid2</parameter></methodparam>
<methodparam><type>int</type><parameter>n</parameter></methodparam>
</methodsynopsis>
<para>
&warn.undocumented.func;
</para>
</refsect1>
</refentry>
<refentry id="function.gettext">
<refnamediv>
<refname>gettext</refname>
<refpurpose>Lookup a message in the current domain</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>gettext</methodname>
<methodparam><type>string</type><parameter>message</parameter></methodparam>
</methodsynopsis>
<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.
</para>
<example>
<title><function>gettext</function>-check</title>
<programlisting>
<![CDATA[
<?php
// Set language to German
putenv ("LANG=de");
// Specify location of translation tables
bindtextdomain ("myPHPApp", "./locale");
// Choose domain
textdomain ("myPHPApp");
// Print a test message
print (gettext ("Welcome to My PHP Application"));
?>
]]>
</programlisting>
</example>
</refsect1>
</refentry>
<refentry id="function.ngettext">
<refnamediv>
<refname>ngettext</refname>
<refpurpose>Plural version of gettext</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>ngettext</methodname>
<methodparam><type>string</type><parameter>msgid1</parameter></methodparam>
<methodparam><type>string</type><parameter>msgid2</parameter></methodparam>
<methodparam><type>int</type><parameter>n</parameter></methodparam>
</methodsynopsis>
<para>
&warn.undocumented.func;
</para>
</refsect1>
</refentry>
<refentry id="function.textdomain">
<refnamediv>
<refname>textdomain</refname>
<refpurpose>Sets the default domain</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>textdomain</methodname>
<methodparam><type>string</type><parameter>text_domain</parameter></methodparam>
</methodsynopsis>
<para>
This function sets the domain to search within when calls are
made to <function>gettext</function>, usually the named after an
application. The previous default domain is returned.
Call it with &null; as parameter to get the current setting without
changing it.
</para>
</refsect1>
</refentry>
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
|