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|array $message, array $vars): 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|array$message The message to be translated
-
array$vars The list of values to interpolate in the message
Returns
stringThe formatted message
Throws
Aura\Intl\Exception\CannotFormatAura\Intl\Exception\CannotInstantiateFormatter