Interface Yiisoft\Translator\MessageFormatterInterface
| Implemented by | Yiisoft\Translator\IntlMessageFormatter, Yiisoft\Translator\NullMessageFormatter, Yiisoft\Translator\SimpleMessageFormatter |
|---|
Message formatter formats the message using parameters and taking locale into account.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| format() | Formats the message using parameters and taking locale into account. | Yiisoft\Translator\MessageFormatterInterface |
Method Details
Formats the message using parameters and taking locale into account.
| public abstract string format ( string $message, array $parameters, string $locale ) | ||
| $message | string |
A message to format. |
| $parameters | array |
Parameters to replace in the message in |
| $locale | string |
Locale to use when formatting. Usually affects formatting numbers, dates etc. |
| return | string |
Formatted message. |
|---|---|---|
public function format(string $message, array $parameters, string $locale): string;
Signup or Login in order to comment.