function admin_language_languages_overview_form_validate in Administration Language 6
Same name and namespace in other branches
- 7 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'
- admin_language_form_locale_languages_overview_form_alter in ./
admin_language.module - Implementation of hook_form_FORM_ID_alter().
File
- ./
admin_language.module, line 393 - Makes sure all admin pages are displayed in the preferred language of the administrator.
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.'));
}
}