public function TMGMTLocalTranslatorPluginController::getSupportedTargetLanguages in Translation Management Tool 7
Returns all available target languages that are supported by this service when given a source language.
Parameters
TMGMTTranslator $translator: The translator entity.
$source_language: The source language.
Return value
array An array of remote languages in ISO format.
Overrides TMGMTDefaultTranslatorPluginController::getSupportedTargetLanguages
File
- translators/
tmgmt_local/ includes/ tmgmt_local.plugin.inc, line 46 - Provides the user translator plugin controller.
Class
- TMGMTLocalTranslatorPluginController
- Local translator plugin controller.
Code
public function getSupportedTargetLanguages(TMGMTTranslator $translator, $source_language) {
$languages = tmgmt_local_supported_target_languages($source_language);
if ($translator
->getSetting('allow_all')) {
$languages += parent::getSupportedTargetLanguages($translator, $source_language);
}
return $languages;
}