function locale_block_info

Implements hook_block_info().

File

modules/locale/locale.module, line 1021

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.