You are here

function locale_block_info in Drupal 7

Implements hook_block_info().

File

modules/locale/locale.module, line 1019
Add language handling functionality and enables the translation of the user interface to languages other than English.

Code

function locale_block_info() {
  include_once DRUPAL_ROOT . '/includes/language.inc';
  $block = array();
  $info = language_types_info();
  foreach (language_types_configurable(FALSE) as $type) {
    $block[$type] = array(
      'info' => t('Language switcher (@type)', array(
        '@type' => $info[$type]['name'],
      )),
      // Not worth caching.
      'cache' => DRUPAL_NO_CACHE,
    );
  }
  return $block;
}