You are here

public function LocalTranslator::requestTranslation in Translation Management Tool 8

@abstract

Submits the translation request and sends it to the translation provider.

During the translation process, Job::getItems() will only return job items that are not already fully translated.

Parameters

\Drupal\tmgmt\JobInterface $job: The job that should be submitted.

Overrides TranslatorPluginInterface::requestTranslation

See also

hook_tmgmt_job_before_request_translation()

hook_tmgmt_job_after_request_translation()

File

translators/tmgmt_local/src/Plugin/tmgmt/Translator/LocalTranslator.php, line 33

Class

LocalTranslator
Drupal user provider.

Namespace

Drupal\tmgmt_local\Plugin\tmgmt\Translator

Code

public function requestTranslation(JobInterface $job) {
  $items = $job
    ->getItems();
  $this
    ->requestJobItemsTranslation($items);

  // The translation job has been successfully submitted.
  $job
    ->submitted();
}