function administration_language_negotiation_admin in Administration Language Negotiation 7
Custom form.
Return value
array
1 string reference to 'administration_language_negotiation_admin'
File
- ./
administration_language_negotiation.admin.inc, line 13 - The admin page of the administration language negotiation module.
Code
function administration_language_negotiation_admin() {
$language_default = language_default();
$languages = language_list('enabled');
$options = array();
foreach ($languages[1] as $language) {
$options[$language->language] = $language->name;
}
$form['administration_language_negotiation_default'] = array(
'#title' => t('Select the default administration language.'),
'#type' => 'radios',
'#options' => $options,
'#default_value' => variable_get('administration_language_negotiation_default', $language_default->language),
'#required' => TRUE,
);
$form['administration_language_negotiation_paths'] = array(
'#type' => 'textarea',
'#title' => t('Paths'),
'#default_value' => implode(variable_get('administration_language_negotiation_paths', array()), "\r\n"),
'#description' => t("Specify pages by using their paths. Enter one path per line. The '*' character is a wildcard. Example paths are %admin for one specific admin page and %admin-wildcard for every admin pages.", array(
'%admin' => 'admin',
'%admin-wildcard' => 'admin/*',
)),
'#size' => 10,
);
$form['#validate'][] = 'administration_language_negotiation_admin_validate';
return system_settings_form($form);
}