W3cubDocs

/CakePHP 4.4

Class IcuFormatter

A formatter that will interpolate variables using the MessageFormatter class

Namespace: Cake\I18n\Formatter

Method Summary

  • format() public

    Returns a string with all passed variables interpolated into the original message. Variables are interpolated using the MessageFormatter class.

Method Detail

format() public

format(string $locale, string $message, array $tokenValues): string

Returns a string with all passed variables interpolated into the original message. Variables are interpolated using the MessageFormatter class.

Parameters

string $locale

The locale in which the message is presented.

string $message

The message to be translated

array $tokenValues

The list of values to interpolate in the message

Returns

string

Throws

Cake\I18n\Exception\I18nException

© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/class-Cake.I18n.Formatter.IcuFormatter.html