Skip to content

Commit 38b606b

Browse files
committed
Document locale_canonicalize
php/doc-en@8a22321
1 parent c05f38a commit 38b606b

File tree

1 file changed

+36
-11
lines changed

1 file changed

+36
-11
lines changed

reference/intl/locale/canonicalize.xml

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 1976eae0d815797af97a1e16c5cd90ffc2868395 Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: 8a22321e312e13fb1e2785169a0e83df84c0c3d0 Maintainer: takagi Status: ready -->
44

55
<refentry xml:id="locale.canonicalize" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
66
<refnamediv>
@@ -15,12 +15,19 @@
1515
<modifier>public</modifier> <modifier>static</modifier> <type class="union"><type>string</type><type>null</type></type><methodname>Locale::canonicalize</methodname>
1616
<methodparam><type>string</type><parameter>locale</parameter></methodparam>
1717
</methodsynopsis>
18-
<para>
19-
20-
</para>
21-
22-
&warn.undocumented.func;
23-
18+
<simpara>
19+
渡されたロケール文字列を、ICU フォーマットに正規化します。
20+
</simpara>
21+
<simpara>
22+
この関数は有効なロケールを示す、
23+
または返すとは限りません。
24+
単に、ICU の規則に従って正規化された入力のバージョンに過ぎません。
25+
</simpara>
26+
<simpara>
27+
この関数の振る舞いは、
28+
PHP が使っている ICU のバージョン
29+
(<constant>INTL_ICU_VERSION</constant>) に依存します。
30+
</simpara>
2431
</refsect1>
2532

2633
<refsect1 role="parameters">
@@ -29,9 +36,9 @@
2936
<varlistentry>
3037
<term><parameter>locale</parameter></term>
3138
<listitem>
32-
<para>
33-
34-
</para>
39+
<simpara>
40+
オリジナルのロケール文字列
41+
</simpara>
3542
</listitem>
3643
</varlistentry>
3744
</variablelist>
@@ -45,7 +52,25 @@
4552
&intl.locale-len.return;
4653
</refsect1>
4754

48-
55+
<refsect1 role="examples">
56+
&reftitle.examples;
57+
<example>
58+
<title><function>locale_canonicalize</function> の例</title>
59+
<programlisting role="php">
60+
<![CDATA[
61+
echo Locale::canonicalize('en-US.utf8') . "\n";
62+
echo Locale::canonicalize('totally-not-valid') . "\n";
63+
]]>
64+
</programlisting>
65+
</example>
66+
&example.outputs.similar;
67+
<screen>
68+
<![CDATA[
69+
en_US
70+
totally_NOT_VALID
71+
]]>
72+
</screen>
73+
</refsect1>
4974
</refentry>
5075
<!-- Keep this comment at the end of the file
5176
Local variables:

0 commit comments

Comments
 (0)