On this page
function locale_block_info
locale_block_info()
Implements hook_block_info().
File
- modules/locale/locale.module, line 1018
- 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;
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!locale!locale.module/function/locale_block_info/7.x