You are here

public function SmartlingTranslator::getSupportedTargetLanguages in TMGMT Translator Smartling 8.3

Same name and namespace in other branches
  1. 8.4 src/Plugin/tmgmt/Translator/SmartlingTranslator.php \Drupal\tmgmt_smartling\Plugin\tmgmt\Translator\SmartlingTranslator::getSupportedTargetLanguages()
  2. 8 src/Plugin/tmgmt/Translator/SmartlingTranslator.php \Drupal\tmgmt_smartling\Plugin\tmgmt\Translator\SmartlingTranslator::getSupportedTargetLanguages()
  3. 8.2 src/Plugin/tmgmt/Translator/SmartlingTranslator.php \Drupal\tmgmt_smartling\Plugin\tmgmt\Translator\SmartlingTranslator::getSupportedTargetLanguages()

Returns all available target languages that are supported by this service when given a source language.

Parameters

TranslatorInterface $translator: The translator entity.

$source_language: The source language.

Return value

array An array of remote languages in ISO format.

Overrides TranslatorPluginBase::getSupportedTargetLanguages

File

src/Plugin/tmgmt/Translator/SmartlingTranslator.php, line 454
Contains \Drupal\tmgmt_smartling\Plugin\tmgmt\Translator\SmartlingTranslator.

Class

SmartlingTranslator
Smartling translator plugin.

Namespace

Drupal\tmgmt_smartling\Plugin\tmgmt\Translator

Code

public function getSupportedTargetLanguages(TranslatorInterface $translator, $source_language) {
  $remote_languages = $this
    ->getSupportedRemoteLanguages($translator);
  unset($remote_languages[$source_language]);
  return $remote_languages;
}