function _locale_string_seek_form in Drupal 4
Same name and namespace in other branches
- 5 includes/locale.inc \_locale_string_seek_form()
User interface for the string search screen
1 call to _locale_string_seek_form()
- locale_string_search in modules/
locale.module - Page handler for the string search.
File
- includes/
locale.inc, line 316 - Admin-related functions for locale.module.
Code
function _locale_string_seek_form() {
// Get *all* languages set up
$languages = locale_supported_languages(FALSE, TRUE);
asort($languages['name']);
unset($languages['name']['en']);
$languages['name'] = array_map('check_plain', $languages['name']);
// Present edit form preserving previous user settings
$query = _locale_string_seek_query();
$form = array();
$form['search'] = array(
'#type' => 'fieldset',
'#title' => t('Search'),
);
$form['search']['string'] = array(
'#type' => 'textfield',
'#title' => t('Strings to search for'),
'#default_value' => $query->string,
'#size' => 30,
'#maxlength' => 30,
'#description' => t('Leave blank to show all strings. The search is case sensitive.'),
);
$form['search']['language'] = array(
'#type' => 'radios',
'#title' => t('Language'),
'#default_value' => $query->language ? $query->language : 'all',
'#options' => array_merge(array(
'all' => t('All languages'),
'en' => t('English (provided by Drupal)'),
), $languages['name']),
);
$form['search']['searchin'] = array(
'#type' => 'radios',
'#title' => t('Search in'),
'#default_value' => $query->searchin ? $query->searchin : 'all',
'#options' => array(
'all' => t('All strings in that language'),
'translated' => t('Only translated strings'),
'untranslated' => t('Only untranslated strings'),
),
);
$form['search']['submit'] = array(
'#type' => 'submit',
'#value' => t('Search'),
);
$form['#redirect'] = FALSE;
return drupal_get_form('_locale_string_seek', $form);
}