i18n\MessageFormatter parse()

parse() public method

Parses an input string according to an ICU message format pattern.

It uses the PHP intl extension's MessageFormatter::parse() and adds support for named arguments. Usage of this method requires PHP intl extension to be installed.

public array|boolean parse ( $pattern, $message, $language )
$pattern string

The pattern to use for parsing the message.

$message string

The message to parse, conforming to the pattern.

$language string

The locale to use for formatting locale-dependent parts

return array|boolean

An array containing items extracted, or FALSE on error.

throws yii\base\NotSupportedException

when PHP intl extension is not installed.

doc_Yii
2016-10-30 17:06:14
Comments
Leave a Comment

Please login to continue.