public function Translator::getRemoteLanguagesMappings in Translation Management Tool 8
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 403
Class
- Translator
- Entity class for the tmgmt_translator entity.
Namespace
Drupal\tmgmt\EntityCode
public function getRemoteLanguagesMappings() {
$remote_languages_mappings = [];
foreach (\Drupal::languageManager()
->getLanguages() as $language => $info) {
$remote_languages_mappings[$language] = $this
->mapToRemoteLanguage($language);
}
return $remote_languages_mappings;
}