public function LingotekCommands::downloadTranslations in Lingotek Translation 3.6.x
Same name and namespace in other branches
- 8.2 src/Cli/Commands/Drush9/LingotekCommands.php \Drupal\lingotek\Cli\Commands\Drush9\LingotekCommands::downloadTranslations()
- 4.0.x src/Cli/Commands/Drush9/LingotekCommands.php \Drupal\lingotek\Cli\Commands\Drush9\LingotekCommands::downloadTranslations()
- 3.0.x src/Cli/Commands/Drush9/LingotekCommands.php \Drupal\lingotek\Cli\Commands\Drush9\LingotekCommands::downloadTranslations()
- 3.1.x src/Cli/Commands/Drush9/LingotekCommands.php \Drupal\lingotek\Cli\Commands\Drush9\LingotekCommands::downloadTranslations()
- 3.2.x src/Cli/Commands/Drush9/LingotekCommands.php \Drupal\lingotek\Cli\Commands\Drush9\LingotekCommands::downloadTranslations()
- 3.3.x src/Cli/Commands/Drush9/LingotekCommands.php \Drupal\lingotek\Cli\Commands\Drush9\LingotekCommands::downloadTranslations()
- 3.4.x src/Cli/Commands/Drush9/LingotekCommands.php \Drupal\lingotek\Cli\Commands\Drush9\LingotekCommands::downloadTranslations()
- 3.5.x src/Cli/Commands/Drush9/LingotekCommands.php \Drupal\lingotek\Cli\Commands\Drush9\LingotekCommands::downloadTranslations()
- 3.7.x src/Cli/Commands/Drush9/LingotekCommands.php \Drupal\lingotek\Cli\Commands\Drush9\LingotekCommands::downloadTranslations()
- 3.8.x src/Cli/Commands/Drush9/LingotekCommands.php \Drupal\lingotek\Cli\Commands\Drush9\LingotekCommands::downloadTranslations()
Download translations from Lingotek.
@usage drush ltk-download node 1 Download translations for node with ID 1. @usage drush ltk-download taxonomy_term 3 --langcodes=es,it Download Spanish and Italian translations for taxonomy term with ID 3.
@command lingotek:download-translations @aliases ltk-download,lingotek-download-translations
Parameters
$entity_type_id: The entity type ID. E.g. "node"
$entity_id: The entity ID. E.g. "2"
File
- src/
Cli/ Commands/ Drush9/ LingotekCommands.php, line 160
Class
- LingotekCommands
- A Drush9 compatible commandfile with Lingotek operations.
Namespace
Drupal\lingotek\Cli\Commands\Drush9Code
public function downloadTranslations($entity_type_id, $entity_id, $options = [
'langcodes' => 'all',
]) {
$this->cliService
->setupOutput($this
->output());
$this->cliService
->setLogger($this
->logger());
$langcodes = StringUtils::csvToArray($options['langcodes']);
$this->cliService
->downloadTranslations($entity_type_id, $entity_id, $langcodes);
}