function globallink_get_drupal_locale_code in GlobalLink Connect for Drupal 7.6
Same name and namespace in other branches
- 7.7 globallink.inc \globallink_get_drupal_locale_code()
- 7.5 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.
18 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_get_translated in globallink_beans/
globallink_beans.inc - Gets number of translated beans.
- 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.
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;
}