You are here

function globallink_get_drupal_locale_code in GlobalLink Connect for Drupal 7.7

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

19 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_beans_import in globallink_beans/globallink_beans.inc
Gets number of translated beans.
globallink_block_import 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_commerce_import in globallink_commerce/globallink_commerce.inc

... See full list

File

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