public function TMGMTDefaultTranslatorPluginController::getSupportedLanguagePairs in Translation Management Tool 7
Default implementation that gets target languages for each remote language. This approach is ineffective and therefore it is advised that a plugin should provide own implementation.
Overrides TMGMTTranslatorPluginControllerInterface::getSupportedLanguagePairs
1 method overrides TMGMTDefaultTranslatorPluginController::getSupportedLanguagePairs()
- TMGMTLocalTranslatorPluginController::getSupportedLanguagePairs in translators/
tmgmt_local/ includes/ tmgmt_local.plugin.inc - Default implementation that gets target languages for each remote language. This approach is ineffective and therefore it is advised that a plugin should provide own implementation.
File
- plugin/
tmgmt.plugin.translator.inc, line 150 - Contains the abstract translator base plugin class.
Class
- TMGMTDefaultTranslatorPluginController
- Default controller class for service plugins.
Code
public function getSupportedLanguagePairs(TMGMTTranslator $translator) {
$language_pairs = array();
foreach ($this
->getSupportedRemoteLanguages($translator) as $source_language) {
foreach ($this
->getSupportedTargetLanguages($translator, $source_language) as $target_language) {
$language_pairs[] = array(
'source_language' => $source_language,
'target_language' => $target_language,
);
}
}
return $language_pairs;
}