You are here

function globallink_get_mapped_locales_with_drupal_desc in GlobalLink Connect for Drupal 7.5

Same name and namespace in other branches
  1. 7.7 globallink.inc \globallink_get_mapped_locales_with_drupal_desc()
  2. 7.6 globallink.inc \globallink_get_mapped_locales_with_drupal_desc()

@todo Document this function.

17 calls to globallink_get_mapped_locales_with_drupal_desc()
globallink_block_dashboard_form in globallink_block/globallink_block_send.inc
Builds form to create a block submission.
globallink_block_receive_filter_form in globallink_block/globallink_block_receive.inc
Builds form to filter blocks to receive on dashboard.
globallink_dashboard_node_form in ./globallink_send_translations.inc
Builds form to create a GlobalLink submission.
globallink_entity_dashboard_form in globallink_entity/globallink_entity_send.inc
Builds form to create an entity submission.
globallink_entity_receive_filter_form in globallink_entity/globallink_entity_receive.inc
Builds form to filter entities to receive on dashboard.

... See full list

File

./globallink.inc, line 976
Miscellaneous GlobalLink functions for node translations (non-entity).

Code

function globallink_get_mapped_locales_with_drupal_desc($remove_default = TRUE) {
  $languages = array();
  $result = db_select('globallink_locale', 'tl')
    ->fields('tl')
    ->isNotNull('drupal_locale_code')
    ->orderBy('locale_desc', 'ASC')
    ->execute();
  foreach ($result as $row) {
    if ($remove_default) {
      if (language_default()->language == $row->drupal_locale_code) {
        continue;
      }
    }
    $languages[$row->locale_code] = $row->drupal_locale_desc;
  }
  return $languages;
}