You are here

function globallink_get_mapped_locale_codes in GlobalLink Connect for Drupal 7.5

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

Gets mapped locale codes.

Return value

array Associative array of mapped locale codes.

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

File

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

Code

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