function translation_block in Internationalization 5.3
Same name and namespace in other branches
- 5 translation/translation.module \translation_block()
- 5.2 translation/translation.module \translation_block()
Implementation of hook_block().
This is a simple language switcher which knows nothing about translations
File
- translation/
translation.module, line 163
Code
function translation_block($op = 'list', $delta = 0) {
if ($op == 'list') {
$blocks[0]['info'] = t('Translations for Content');
}
elseif ($op == 'view') {
$blocks['subject'] = t('Languages');
$query = drupal_query_string_encode($_GET, array(
'q',
));
$blocks['content'] = theme('item_list', translation_get_links($_GET['q'], empty($query) ? NULL : $query));
}
return $blocks;
}