i18n\I18N translate()

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. en-US, en).

return string

The translated and formatted message.

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

Please login to continue.