Translate Interface
Describes Translate interface.
getSupportedLanguages
Retrieve supported languages.
$languages = $translate->getSupportedLanguages();
withSource
Return an instance with provided source language.
$translate = $translate->withSource($source);
getSource
Retrieve provided source language.
$source = $translate->getSource();
withTarget
Return an instance with provided target language.
$translate = $translate->withTarget($target);
getTarget
Retrieve provided target language.
$target = $translate->getTarget();
withText
Return an instance with provided text.
$translate = $translate->withText($text);
getText
Retrieve provided text.
$text = $translate->getText();
translate
Retrieve translated text.
$translated_text = $translate->translate();