You are here

public function GoogleTranslator::requestTranslation in TMGMT Translator Google 8

Implements TMGMTTranslatorPluginControllerInterface::requestTranslation().

Overrides TranslatorPluginInterface::requestTranslation

File

src/Plugin/tmgmt/Translator/GoogleTranslator.php, line 141
Contains \Drupal\tmgmt_microsoft\Plugin\tmgmt\Translator\MicrosoftTranslator.

Class

GoogleTranslator
Google translator plugin.

Namespace

Drupal\tmgmt_google\Plugin\tmgmt\Translator

Code

public function requestTranslation(JobInterface $job) {
  $this
    ->requestJobItemsTranslation($job
    ->getItems());
  if (!$job
    ->isRejected()) {
    $job
      ->submitted('The translation job has been submitted.');
  }
}