You are here

function globallink_get_drupal_locale_name in GlobalLink Connect for Drupal 7.7

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

Gets Drupal locale name based on its code.

Parameters

string $tpt_locale_code: The locale code.

Return value

string The locale name.

3 calls to globallink_get_drupal_locale_name()
globallink_create_submission in ./globallink_background_jobs.inc
globallink_entity_dashboard_form in globallink_entity/globallink_entity_send.inc
Builds form to create an entity submission.
globallink_locale_submit in ./globallink_locale_mapping.inc
Handles submission of globallink_locale form.

File

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

Code

function globallink_get_drupal_locale_name($tpt_locale_code) {
  $result = db_select('globallink_locale', 'tl')
    ->fields('tl')
    ->condition('locale_code', $tpt_locale_code, '=')
    ->execute();
  $locale_name = '';
  foreach ($result as $row) {
    $locale_name = $row->drupal_locale_desc;
  }
  return $locale_name;
}