You are here

function globallink_get_drupal_locale_code in GlobalLink Connect for Drupal 7.5

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

Gets Drupal locale code.

Parameters

string $locale_code: The locale code.

Return value

string The Drupal locale code.

16 calls to globallink_get_drupal_locale_code()
get_tpt_entity_sent_rows in globallink_entity/globallink_entity.module
Gets entity rows that have been sent for translation.
globallink_block_get_translated_blocks in globallink_block/globallink_block.inc
Gets number of translated blocks.
globallink_block_send_blocks_for_translations in globallink_block/globallink_block.inc
Sends blocks for translation.
globallink_entity_get_translations_for_row_id in globallink_entity/globallink_entity_receive.inc
Gets entity translations by row ID.
globallink_entity_send_for_translations in globallink_entity/globallink_entity.inc
Sends entities for translation.

... See full list

File

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

Code

function globallink_get_drupal_locale_code($locale_code) {
  $result = db_select('globallink_locale', 'tl')
    ->fields('tl')
    ->condition('locale_code', $locale_code, '=')
    ->execute();
  $drupal_code = '';
  foreach ($result as $row) {
    $drupal_code = $row->drupal_locale_code;
  }
  return $drupal_code;
}