You are here

function globallink_get_target_options in GlobalLink Connect for Drupal 7.5

Same name and namespace in other branches
  1. 7.7 globallink_send_translations.inc \globallink_get_target_options()
  2. 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 326

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;
}