|
MessageFormatter::setPatternmsgfmt_set_patternSet the pattern used by the formatter DescriptionObject oriented style
public
bool
MessageFormatter::setPattern
( string
$pattern
)Procedural style
bool
msgfmt_set_pattern
( MessageFormatter
$fmt
, string $pattern
)Set the pattern used by the formatter Parameters
Return Values
Returns ExamplesExample #1 msgfmt_set_pattern example
<?php Example #2 OO example
<?php The above example will output: Default pattern: '{0,number} monkeys on {1,number} trees' Formatting result: 123 monkeys on 456 trees New pattern: '{0,number} trees hosting {1,number} monkeys' Formatted number: 123 trees hosting 456 monkeys See Also
|