function wsdata_language_plugin_header_form in Web Service Data 7
Header language plugin form
2 string references to 'wsdata_language_plugin_header_form'
- hook_wsdata_language_plugin in ./
wsdata.api.php - List of language handler plugins
- wsdata_wsdata_language_plugin in ./
wsdata.module - Implements hook_wsdata_language_plugin().
File
- ./
wsdata.admin.inc, line 27 - Administrator forms for wsdata
Code
function wsdata_language_plugin_header_form($settings = array()) {
$form['header'] = array(
'#type' => 'textfield',
'#title' => t('Name'),
'#description' => t('Name of the header to set. Default is "Accept-Language"'),
'#size' => 40,
'#maxlength' => 255,
'#default_value' => isset($settings['header']) ? $settings['header'] : 'Accept-Language',
);
$languages = language_list();
foreach ($languages as $language) {
$form[$language->language] = array(
'#type' => 'textfield',
'#title' => $language->native,
'#description' => t('Value to use when requesting @lang values.', array(
'@lang' => $language->native,
)),
'#size' => 40,
'#maxlength' => 255,
'#default_value' => isset($settings[$language->language]) ? $settings[$language->language] : $language->language,
);
}
return $form;
}