function tmgmt_local_supported_target_languages in Translation Management Tool 7
Same name and namespace in other branches
- 8 translators/tmgmt_local/tmgmt_local.module \tmgmt_local_supported_target_languages()
Gets supported target languages.
Parameters
string $source_language: Source language for which to get target languages.
array $uids: List of user ids for whom to get the target languages.
Return value
array List of target languages where code is the key as well as the value.
3 calls to tmgmt_local_supported_target_languages()
- TMGMTLocalTestCase::testCapabilitiesAPI in translators/
tmgmt_local/ tmgmt_local.test - TMGMTLocalTranslatorPluginController::getSupportedTargetLanguages in translators/
tmgmt_local/ includes/ tmgmt_local.plugin.inc - Returns all available target languages that are supported by this service when given a source language.
- tmgmt_local_translation_access in translators/
tmgmt_local/ tmgmt_local.module - Determine whether the current user is allowed to translate a given translation task.
File
- translators/
tmgmt_local/ tmgmt_local.module, line 749 - Main module file for the local translation module.
Code
function tmgmt_local_supported_target_languages($source_language, $uids = array()) {
$pairs = tmgmt_local_supported_language_pairs($source_language, $uids);
$supported_languages = array();
foreach ($pairs as $pair) {
$supported_languages[$pair['target_language']] = $pair['target_language'];
}
return $supported_languages;
}