function i18ntaxonomy_form_vocabulary_validate in Internationalization 6
1 string reference to 'i18ntaxonomy_form_vocabulary_validate'
- i18ntaxonomy_form_alter in i18ntaxonomy/
i18ntaxonomy.module - Implementation of hook_form_alter().
File
- i18ntaxonomy/
i18ntaxonomy.module, line 485 - i18n taxonomy module
Code
function i18ntaxonomy_form_vocabulary_validate($form, &$form_state) {
$language = !empty($form_state['values']['language']) ? $form_state['values']['language'] : '';
$mode = $form_state['values']['i18nmode'];
if ($mode != I18N_TAXONOMY_LANGUAGE && $language) {
form_set_error('language', t('Setting a vocabulary language only makes sense in the "Set language to vocabulary" translation mode. Either change to this mode or do not select a language.'));
}
elseif ($mode == I18N_TAXONOMY_LANGUAGE && !$language) {
form_set_error('language', t('If selecting "Set language to vocabulary" you need to set a language to this vocabulary. Either change the translation mode or select a language.'));
}
}