You are here

function globallink_get_tpt_list in GlobalLink Connect for Drupal 7.7

Same name and namespace in other branches
  1. 7.5 globallink_locale_mapping.inc \globallink_get_tpt_list()
  2. 7.6 globallink_locale_mapping.inc \globallink_get_tpt_list()

Gets locale list.

Return value

array Associative array of locales.

1 call to globallink_get_tpt_list()
globallink_locale in ./globallink_locale_mapping.inc
Renders form for globallink_locale.

File

./globallink_locale_mapping.inc, line 254
Globallink_locale_mapping.inc is a file that contains most functions needed on the Locale Mapping UI.

Code

function globallink_get_tpt_list() {
  $languages = array();
  $result = db_select('globallink_locale', 'tl')
    ->fields('tl')
    ->isNull('drupal_locale_code')
    ->orderBy('locale_desc', 'ASC')
    ->execute();
  foreach ($result as $row) {
    $languages[$row->locale_code] = $row->locale_desc;
  }
  return $languages;
}