diff --git a/includes/ckeditor_link.taxonomy.inc b/includes/ckeditor_link.taxonomy.inc index a38ed50..f5d4d99 100644 --- a/includes/ckeditor_link.taxonomy.inc +++ b/includes/ckeditor_link.taxonomy.inc @@ -63,11 +63,19 @@ function ckeditor_link_ckeditor_link_taxonomy_url($path, $langcode) { $languages = ckeditor_link_get_languages(); if ($languages) { $term = taxonomy_term_load($tid); - if ($term && ($language = @$term->language) && ($language != LANGUAGE_NONE) && isset($languages[$language])) { - $langcode = $language; + if ($term) { + $taxonomy = taxonomy_vocabulary_load($term->vid); + $entity_translation_support = FALSE; + if ($taxonomy && isset($taxonomy->i18n_mode) && $taxonomy->i18n_mode == I18N_MODE_LOCALIZE) { + $entity_translation_entity_types = + variable_get('entity_translation_entity_types', array('taxonomy_term' => 0)); + $entity_translation_support = (boolean) $entity_translation_entity_types['taxonomy_term']; + } + if (!$entity_translation_support && ($language = @$term->language) && ($language != LANGUAGE_NONE) && isset($languages[$language])) { + $langcode = $language; + } } } - return ckeditor_link_url("taxonomy/term/$tid", $langcode); }