diff --git a/references_dialog.dialog_widgets.inc b/references_dialog.dialog_widgets.inc index 86a4f88..13e4ae2 100644 --- a/references_dialog.dialog_widgets.inc +++ b/references_dialog.dialog_widgets.inc @@ -370,6 +370,13 @@ function references_dialog_term_reference_add_link($element, $widget_settings, $ $vocabulary = $field['settings']['allowed_values'][0]['vocabulary']; $add_links = array(); if (user_access('administer taxonomy') || (module_exists('taxonomy_access_fix') && taxonomy_access_fix_access('add terms', $vocabulary))) { + $vocabulary_name = $field['settings']['allowed_values'][0]['vocabulary']; + if($vocabulary = taxonomy_vocabulary_machine_name_load($field['settings']['allowed_values'][0]['vocabulary'])) { + $vocabulary_name = $vocabulary->name; + if(module_exists('i18n_taxonomy')) { + $vocabulary_name = i18n_taxonomy_vocabulary_name($vocabulary); + } + } $add_links[] = array( 'title' => t('Create @type', array('@type' => taxonomy_vocabulary_machine_name_load($vocabulary)->name)), 'href' => 'admin/structure/taxonomy/' . $field['settings']['allowed_values'][0]['vocabulary'] . '/add',