Implements hook_block_info().
function language_block_info() {
include_once DRUPAL_ROOT . '/core/includes/language.inc';
$block = array();
$info = language_types_info();
foreach (language_types_get_configurable(FALSE) as $type) {
$block[$type] = array(
// We do not need to escape the language type name since the block 'info'
// value is supposed not to be sanitized. It is escaped later, if needed.
'info' => t('Language switcher (!type)', array(
'!type' => $info[$type]['name'],
)),
// Not worth caching.
'cache' => DRUPAL_NO_CACHE,
);
}
return $block;
}