reference/gettext/functions/bindtextdomain.xml
f456b5951e08d9c010e9717b2a7f7009a46ae5d8
...
...
@@ -3,18 +3,18 @@
3
3
<refentry xml:id="function.bindtextdomain" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>bindtextdomain</refname>
6
-
<refpurpose>Sets the path for a domain</refpurpose>
6
+
<refpurpose>Sets or gets the path for a domain</refpurpose>
7
7
</refnamediv>
8
8

9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>string</type><methodname>bindtextdomain</methodname>
12
+
<type class="union"><type>string</type><type>false</type></type><methodname>bindtextdomain</methodname>
13
13
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
14
-
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
14
+
<methodparam><type class="union"><type>string</type><type>null</type></type><parameter>directory</parameter></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
-
The <function>bindtextdomain</function> function sets the path
17
+
The <function>bindtextdomain</function> function sets or gets the path
18
18
for a domain.
19
19
</para>
20
20
</refsect1>
...
...
@@ -27,7 +27,7 @@
27
27
<term><parameter>domain</parameter></term>
28
28
<listitem>
29
29
<para>
30
-
The domain
30
+
The domain.
31
31
</para>
32
32
</listitem>
33
33
</varlistentry>
...
...
@@ -35,7 +35,9 @@
35
35
<term><parameter>directory</parameter></term>
36
36
<listitem>
37
37
<para>
38
-
The directory path
38
+
The directory path.
39
+
An empty string means the current directory.
40
+
If &null;, the currently set directory is returned.
39
41
</para>
40
42
</listitem>
41
43
</varlistentry>
...
...
@@ -46,10 +48,34 @@
46
48
<refsect1 role="returnvalues">
47
49
&reftitle.returnvalues;
48
50
<para>
49
-
The full pathname for the <parameter>domain</parameter> currently being set.
51
+
The full pathname for the <parameter>domain</parameter> currently being set,
52
+
&return.falseforfailure;.
50
53
</para>
51
54
</refsect1>
52
55

56
+
<refsect1 role="changelog">
57
+
&reftitle.changelog;
58
+
<informaltable>
59
+
<tgroup cols="2">
60
+
<thead>
61
+
<row>
62
+
<entry>&Version;</entry>
63
+
<entry>&Description;</entry>
64
+
</row>
65
+
</thead>
66
+
<tbody>
67
+
<row>
68
+
<entry>8.0.3</entry>
69
+
<entry>
70
+
<parameter>directory</parameter> is nullable now.
71
+
Previously, it was not possible to retrieve the currently set directory.
72
+
</entry>
73
+
</row>
74
+
</tbody>
75
+
</tgroup>
76
+
</informaltable>
77
+
</refsect1>
78
+

53
79
<refsect1 role="examples">
54
80
&reftitle.examples;
55
81
<para>
...
...
@@ -74,8 +100,17 @@ echo bindtextdomain($domain, '/usr/share/myapp/locale');
74
100
</example>
75
101
</para>
76
102
</refsect1>
77
-
</refentry>
78
103

104
+
<refsect1 role="notes">
105
+
&reftitle.notes;
106
+
<note>
107
+
<para>
108
+
The <function>bindtextdomain</function> information is maintained per process,
109
+
not per thread.
110
+
</para>
111
+
</note>
112
+
</refsect1>
113
+
</refentry>
79
114
<!-- Keep this comment at the end of the file
80
115
Local variables:
81
116
mode: sgml
82
117