i18n\MessageSource translate()

translate() public method

Translates a message to the specified language.

Note that unless $forceTranslation is true, if the target language is the same as the source language, the message will NOT be translated.

If a translation is not found, a missingTranslation event will be triggered.

public string|boolean translate ( $category, $message, $language )
$category string

The message category

$message string

The message to be translated

$language string

The target language

return string|boolean

The translated message or false if translation wasn't found or isn't required

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

Please login to continue.