|
MessageFormatter::formatMessagemsgfmt_format_messageQuick format message DescriptionObject oriented style
public
static
string
MessageFormatter::formatMessage
( string
$locale
, string $pattern
, array $args
)Procedural style
string
msgfmt_format_message
( string
$locale
, string $pattern
, array $args
)Quick formatting function that formats the string without having to explicitly create the formatter object. Use this function when the format operation is done only once and does not need and parameters or state to be kept. Parameters
Return Values
The formatted pattern string or ExamplesExample #1 msgfmt_format_message example
<?php Example #2 OO example
<?php The above example will output: 4,560 monkeys on 123 trees make 37.073 monkeys per tree 4.560 Affen auf 123 Bäumen sind 37,073 Affen pro Baum See Also
|