MessageFormatter::createMessageFormatter::__constructmsgfmt_createConstructs a new Message Formatter
&reftitle.description;
Object oriented style (method)
MessageFormatterMessageFormatter::createstringlocalestringpattern
Object oriented style (constructor):
MessageFormatter::__constructstringlocalestringpattern
Procedural style
MessageFormattermsgfmt_createstringlocalestringpattern
Constructs a new Message Formatter
&reftitle.parameters;
locale
The locale to use when formatting arguments
pattern
The pattern string to stick arguments into.
The pattern uses an 'apostrophe-friendly' syntax; it is run through
umsg_autoQuoteApostrophe
before being interpreted.
&reftitle.returnvalues;
The formatter object
&reftitle.examples;
msgfmt_create example
]]>
OO example
format(array(4560, 123, 4560/123));
$fmt = new MessageFormatter("de", "{0,number,integer} Affen auf {1,number,integer} Bäumen sind {2,number} Affen pro Baum");
echo $fmt->format(array(4560, 123, 4560/123));
?>
]]>
&example.outputs;
&reftitle.seealso;
msgfmt_formatmsgfmt_parsemsgfmt_get_error_codemsgfmt_get_error_message