public function Translator::getRemoteLanguagesMappings

Gets existing remote languages mappings.

This method is responsible to provide all local to remote language pairs.

Return value

array An array of local => remote language codes

Overrides TranslatorInterface::getRemoteLanguagesMappings

File

src/Entity/Translator.php, line 404

Class

Translator
Entity class for the tmgmt_translator entity.

Namespace

Drupal\tmgmt\Entity

Code

public function getRemoteLanguagesMappings() {
  $remote_languages_mappings = [];
  foreach (\Drupal::languageManager()
    ->getLanguages() as $language => $info) {
    $remote_languages_mappings[$language] = $this
      ->mapToRemoteLanguage($language);
  }
  return $remote_languages_mappings;
}