function i18n_node_form_search_form_alter in Internationalization 7
Implements hook_form_FORM_ID_alter().
File
- i18n_node/
i18n_node.module, line 398 - Internationalization (i18n) module - Node type handling
Code
function i18n_node_form_search_form_alter(&$form, &$form_state) {
// Advanced search form. Add language and localize content type names
if ($form['module']['#value'] == 'node' && !empty($form['advanced'])) {
// @todo Handle language search conditions
//$form['advanced']['language'] = _i18n_language_select();
if (!empty($form['advanced']['type'])) {
foreach ($form['advanced']['type']['#options'] as $type => $name) {
$form['advanced']['type']['#options'][$type] = i18n_node_translate_type($type, 'name', $name);
}
}
}
}