reference/intl/locale/lookup.xml
1976eae0d815797af97a1e16c5cd90ffc2868395
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="locale.lookup">
3
+
<refentry xml:id="locale.lookup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
4
4
<refnamediv>
5
5
<refname>Locale::lookup</refname>
6
6
<refname>locale_lookup</refname>
...
...
@@ -12,29 +12,25 @@
12
12
<para>
13
13
&style.oop;
14
14
</para>
15
-
<methodsynopsis>
16
-
<modifier>public</modifier>
17
-
<modifier>static</modifier>
18
-
<type>string</type>
19
-
<methodname>Locale::lookup</methodname>
20
-
<methodparam><type>array</type><parameter>langtag</parameter></methodparam>
15
+
<methodsynopsis role="Locale">
16
+
<modifier>public</modifier> <modifier>static</modifier> <type class="union"><type>string</type><type>null</type></type><methodname>Locale::lookup</methodname>
17
+
<methodparam><type>array</type><parameter>languageTag</parameter></methodparam>
21
18
<methodparam><type>string</type><parameter>locale</parameter></methodparam>
22
-
<methodparam choice="opt"><type>bool</type><parameter>canonicalize</parameter><initializer>false</initializer></methodparam>
23
-
<methodparam choice="opt"><type>string</type><parameter>default</parameter></methodparam>
19
+
<methodparam choice="opt"><type>bool</type><parameter>canonicalize</parameter><initializer>&false;</initializer></methodparam>
20
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>defaultLocale</parameter><initializer>&null;</initializer></methodparam>
24
21
</methodsynopsis>
25
22
<para>
26
23
&style.procedural;
27
24
</para>
28
25
<methodsynopsis>
29
-
<type>string</type>
30
-
<methodname>locale_lookup</methodname>
31
-
<methodparam><type>array</type><parameter>langtag</parameter></methodparam>
26
+
<type class="union"><type>string</type><type>null</type></type><methodname>locale_lookup</methodname>
27
+
<methodparam><type>array</type><parameter>languageTag</parameter></methodparam>
32
28
<methodparam><type>string</type><parameter>locale</parameter></methodparam>
33
-
<methodparam choice="opt"><type>bool</type><parameter>canonicalize</parameter><initializer>false</initializer></methodparam>
34
-
<methodparam choice="opt"><type>string</type><parameter>default</parameter></methodparam>
29
+
<methodparam choice="opt"><type>bool</type><parameter>canonicalize</parameter><initializer>&false;</initializer></methodparam>
30
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>defaultLocale</parameter><initializer>&null;</initializer></methodparam>
35
31
</methodsynopsis>
36
32
<para>
37
-
Searches the items in <parameter>langtag</parameter> for the best match to
33
+
Searches the items in <parameter>languageTag</parameter> for the best match to
38
34
the language range specified in <parameter>locale</parameter> according to
39
35
RFC 4647's lookup algorithm.
40
36
</para>
...
...
@@ -45,7 +41,7 @@
45
41
<para>
46
42
<variablelist>
47
43
<varlistentry>
48
-
<term><parameter>langtag</parameter></term>
44
+
<term><parameter>languageTag</parameter></term>
49
45
<listitem>
50
46
<para>
51
47
An <type>array</type> containing a list of language tags to compare to
...
...
@@ -73,7 +69,7 @@
73
69
</listitem>
74
70
</varlistentry>
75
71
<varlistentry>
76
-
<term><parameter>default</parameter></term>
72
+
<term><parameter>defaultLocale</parameter></term>
77
73
<listitem>
78
74
<para>
79
75
The locale to use if no match is found.
...
...
@@ -90,6 +86,29 @@
90
86
<para>
91
87
The closest matching language tag or default value.
92
88
</para>
89
+
&intl.locale-len.return;
90
+
</refsect1>
91
+

92
+
<refsect1 role="changelog">
93
+
&reftitle.changelog;
94
+
<informaltable>
95
+
<tgroup cols="2">
96
+
<thead>
97
+
<row>
98
+
<entry>&Version;</entry>
99
+
<entry>&Description;</entry>
100
+
</row>
101
+
</thead>
102
+
<tbody>
103
+
<row>
104
+
<entry>7.4.0</entry>
105
+
<entry>
106
+
<parameter>defaultLocale</parameter> is nullable now.
107
+
</entry>
108
+
</row>
109
+
</tbody>
110
+
</tgroup>
111
+
</informaltable>
93
112
</refsect1>
94
113

95
114
<refsect1 role="examples">
96
115