You are here

function i18nblocks_load in Internationalization 6

Get block language data.

2 calls to i18nblocks_load()
i18nblocks_form_alter in i18nblocks/i18nblocks.module
Implementation of block form_alter().
i18n_Blocks_Test::testBlockTranslation in tests/i18n_blocks.test

File

i18nblocks/i18nblocks.module, line 174
Internationalization (i18n) submodule: Multilingual meta-blocks

Code

function i18nblocks_load($module, $delta) {
  $block = db_fetch_object(db_query("SELECT * FROM {i18n_blocks} WHERE module = '%s' AND delta = '%s'", $module, $delta));

  // If no result, return default settings
  if ($block && !$block->language) {
    $block->language = I18N_BLOCK_LOCALIZE;
  }
  return $block ? $block : (object) array(
    'language' => '',
    'ibid' => 0,
  );
}