reference/intl/numberformatter/format-currency.xml
1976eae0d815797af97a1e16c5cd90ffc2868395
...
...
@@ -12,21 +12,18 @@
12
12
<para>
13
13
&style.oop;
14
14
</para>
15
-
<methodsynopsis>
16
-
<modifier>public</modifier>
17
-
<type>string</type>
18
-
<methodname>NumberFormatter::formatCurrency</methodname>
19
-
<methodparam><type>float</type><parameter>value</parameter></methodparam>
15
+
<methodsynopsis role="NumberFormatter">
16
+
<modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>NumberFormatter::formatCurrency</methodname>
17
+
<methodparam><type>float</type><parameter>amount</parameter></methodparam>
20
18
<methodparam><type>string</type><parameter>currency</parameter></methodparam>
21
19
</methodsynopsis>
22
20
<para>
23
21
&style.procedural;
24
22
</para>
25
23
<methodsynopsis>
26
-
<type>string</type>
27
-
<methodname>numfmt_format_currency</methodname>
28
-
<methodparam><type>NumberFormatter</type><parameter>fmt</parameter></methodparam>
29
-
<methodparam><type>float</type><parameter>value</parameter></methodparam>
24
+
<type class="union"><type>string</type><type>false</type></type><methodname>numfmt_format_currency</methodname>
25
+
<methodparam><type>NumberFormatter</type><parameter>formatter</parameter></methodparam>
26
+
<methodparam><type>float</type><parameter>amount</parameter></methodparam>
30
27
<methodparam><type>string</type><parameter>currency</parameter></methodparam>
31
28
</methodsynopsis>
32
29
<para>
...
...
@@ -39,7 +36,7 @@
39
36
<para>
40
37
<variablelist>
41
38
<varlistentry>
42
-
<term><parameter>fmt</parameter></term>
39
+
<term><parameter>formatter</parameter></term>
43
40
<listitem>
44
41
<para>
45
42
<classname>NumberFormatter</classname> object.
...
...
@@ -47,7 +44,7 @@
47
44
</listitem>
48
45
</varlistentry>
49
46
<varlistentry>
50
-
<term><parameter>value</parameter></term>
47
+
<term><parameter>amount</parameter></term>
51
48
<listitem>
52
49
<para>
53
50
The numeric currency value.
...
...
@@ -117,6 +114,19 @@ echo $fmt->formatCurrency(1234567.891234567890000, "RUR")."\n";
117
114
</screen>
118
115
</refsect1>
119
116

117
+
<refsect1 role="notes">
118
+
&reftitle.notes;
119
+
<note>
120
+
<para>
121
+
Formats achievable by this method of formatting cannot fully use the possibilities of underlying ICU library,
122
+
such as to format currency with narrow currency symbol.
123
+
</para>
124
+
<para>
125
+
To fully utilize them use <function>msgfmt_format_message</function>.
126
+
</para>
127
+
</note>
128
+
</refsect1>
129
+

120
130
<refsect1 role="seealso">
121
131
&reftitle.seealso;
122
132
<para>
...
...
@@ -124,11 +134,11 @@ echo $fmt->formatCurrency(1234567.891234567890000, "RUR")."\n";
124
134
<member><function>numfmt_get_error_code</function></member>
125
135
<member><function>numfmt_format</function></member>
126
136
<member><function>numfmt_parse_currency</function></member>
137
+
<member><function>msgfmt_format_message</function></member>
127
138
</simplelist>
128
139
</para>
129
140
</refsect1>
130
141
</refentry>
131
-

132
142
<!-- Keep this comment at the end of the file
133
143
Local variables:
134
144
mode: sgml
135
145