function i18n_block in Internationalization 5.3
Same name and namespace in other branches
- 5 i18n.module \i18n_block()
- 5.2 i18n.module \i18n_block()
Language block
This is a simple language switcher which knows nothing about translations
File
- ./
i18n.module, line 104 - Internationalization (i18n) module
Code
function i18n_block($op = 'list', $delta = 0) {
if ($op == 'list') {
$blocks[0]['info'] = t('Language switcher (Interface only)');
}
elseif ($op == 'view') {
$blocks['subject'] = t('Languages');
$query = drupal_query_string_encode($_GET, array(
'q',
));
$blocks['content'] = theme('item_list', i18n_get_links($_GET['q'], empty($query) ? NULL : $query));
}
return $blocks;
}