public function TMGMTGoogleTranslatorPluginController::getSupportedTargetLanguages in TMGMT Translator Google 7
Overrides TMGMTDefaultTranslatorPluginController::getSupportedTargetLanguages().
Overrides TMGMTDefaultTranslatorPluginController::getSupportedTargetLanguages
File
- ./
tmgmt_google.plugin.inc, line 176 - Provides Google Translator plugin controller.
Class
- TMGMTGoogleTranslatorPluginController
- Google translator plugin controller.
Code
public function getSupportedTargetLanguages(TMGMTTranslator $translator, $source_language) {
$languages = array();
$remote_languages = $this
->getSupportedRemoteLanguages($translator);
foreach ($remote_languages as $remote_language) {
$local_language = $translator
->mapToLocalLanguage($remote_language);
$languages[$local_language] = $local_language;
}
if (isset($languages[$source_language])) {
unset($languages[$source_language]);
}
return $languages;
}