Index: i18ntaxonomy/i18ntaxonomy.module =================================================================== --- i18ntaxonomy/i18ntaxonomy.module (revision 350) +++ i18ntaxonomy/i18ntaxonomy.module (working copy) @@ -494,16 +494,18 @@ // Regenerate the whole field for translatable vocabularies. foreach (element_children($form['taxonomy']) as $vid) { + $type = i18ntaxonomy_vocabulary($vid); if ($vid == 'tags') { // Special treatment for tags, add some help texts foreach (element_children($form['taxonomy']['tags']) as $vid) { - if (i18ntaxonomy_vocabulary($vid) == I18N_TAXONOMY_LOCALIZE) { + $type = i18ntaxonomy_vocabulary($vid); + if ($type == I18N_TAXONOMY_LOCALIZE || $type == I18N_TAXONOMY_TRANSLATE || $type == I18N_TAXONOMY_NONE) { $form['taxonomy']['tags'][$vid]['#title'] = check_plain(i18nstrings("taxonomy:vocabulary:$vid:name", $form['taxonomy']['tags'][$vid]['#title'])); $form['taxonomy']['tags'][$vid]['#description'] .= ' '. t('This is a localizable vocabulary, so only terms in %language are allowed here.', array('%language' => language_default('name'))); } } } - elseif (is_numeric($vid) && i18ntaxonomy_vocabulary($vid) == I18N_TAXONOMY_LOCALIZE) { + elseif (is_numeric($vid) && $type == I18N_TAXONOMY_LOCALIZE) { // Rebuild this vocabulary's form. $vocabulary = taxonomy_vocabulary_load($vid); // Extract terms belonging to the vocabulary in question. @@ -518,6 +520,14 @@ $form['taxonomy'][$vid]['#weight'] = $vocabulary->weight; $form['taxonomy'][$vid]['#required'] = $vocabulary->required; } + + //Making vocabularies name and description translatable + if ($type == I18N_TAXONOMY_LOCALIZE || $type == I18N_TAXONOMY_TRANSLATE || $type == I18N_TAXONOMY_NONE) { + if ($vid != 'tags') { + $form['taxonomy'][$vid]['#title'] = check_plain(tt("taxonomy:vocabulary:$vid:name", $form['taxonomy'][$vid]['#title'])); + $form['taxonomy'][$vid]['#description'] = check_plain(tt("taxonomy:vocabulary:$vid:help", $form['taxonomy'][$vid]['#description'])) . ' '. t('This is a localizable vocabulary, so only terms in %language are allowed here.', array('%language' => language_default('name'))); + } + } } }