You are here

function globallink_entity_get_target_options in GlobalLink Connect for Drupal 7.7

Same name and namespace in other branches
  1. 7.5 globallink_entity/globallink_entity_send.inc \globallink_entity_get_target_options()
  2. 7.6 globallink_entity/globallink_entity_send.inc \globallink_entity_get_target_options()

Gets target options for entity.

Parameters

string $selected: The selected entity.

Return value

string The target options.

1 call to globallink_entity_get_target_options()
globallink_entity_dashboard_filter_form in globallink_entity/globallink_entity_send.inc
Builds form to filter entities to send for translation on dashboard.

File

globallink_entity/globallink_entity_send.inc, line 349

Code

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