function globallink_get_target_options in GlobalLink Connect for Drupal 7.7
Same name and namespace in other branches
- 7.5 globallink_send_translations.inc \globallink_get_target_options()
- 7.6 globallink_send_translations.inc \globallink_get_target_options()
Gets target options for GlobalLink node.
Parameters
string $selected: The selected GlobalLink node.
Return value
string The target options.
1 call to globallink_get_target_options()
- globallink_dashboard_node_filter_form in ./
globallink_send_translations.inc - Builds form to filter GlobalLink nodes to send for translation on dashboard.
File
- ./
globallink_send_translations.inc, line 345
Code
function globallink_get_target_options($selected) {
$lang_filter = array();
$languages = globallink_get_mapped_drupal_locales(FALSE);
foreach ($languages as $key => $lang) {
$lang_filter[$key] = $lang;
}
if ($selected) {
unset($lang_filter[$selected]);
}
$any = array(
'[Any]' => t('Any'),
);
return $any + $lang_filter;
}