You are here

function globallink_get_drupal_locale_name in GlobalLink Connect for Drupal 7.5

Same name and namespace in other branches
  1. 7.7 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.

10 calls to globallink_get_drupal_locale_name()
globallink_block_receive_form in globallink_block/globallink_block_receive.inc
Builds form to receive a block submission.
globallink_dashboard_receive in ./globallink_receive_translations.inc
Builds form to receive a GlobalLink submission.
globallink_entity_dashboard_form in globallink_entity/globallink_entity_send.inc
Builds form to create an entity submission.
globallink_entity_receive_form in globallink_entity/globallink_entity_receive.inc
Builds form to receive an entity submission.
globallink_fieldable_panels_receive_form in globallink_fieldable_panels/globallink_fieldable_panels_receive.inc
Builds form to receive a fieldable panels submission.

... See full list

File

./globallink.inc, line 283
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;
}