translate() public method
Translates a message to the specified language.
After translation the message will be formatted using yii\i18n\MessageFormatter if it contains ICU message format and $params are not empty.
| public string translate ( $category, $message, $params, $language ) | ||
|---|---|---|
| $category | string |
The message category. |
| $message | string |
The message to be translated. |
| $params | array |
The parameters that will be used to replace the corresponding placeholders in the message. |
| $language | string |
The language code (e.g. |
| return | string |
The translated and formatted message. |
Please login to continue.