function admin_language_languages_overview_form_validate in Administration Language 7
Same name and namespace in other branches
- 6 admin_language.module \admin_language_languages_overview_form_validate()
Validation handler for the augmented language overview form.
1 string reference to 'admin_language_languages_overview_form_validate'
File
- ./
admin_language.module, line 524 - Makes admin pages be displayed in the administrator's preferred language.
Code
function admin_language_languages_overview_form_validate($form, &$form_state) {
$admin_language = $form_state['values']['admin_language'];
$enabled = $form_state['values']['enabled'][$admin_language];
$default = language_default();
if ($admin_language != $default->language && !$enabled) {
form_set_error('', t('Only enabled languages can be chosen as the admin language.'));
}
}