From b68685e80635e0f18ceb4526ee895f042d5f4102 Mon Sep 17 00:00:00 2001
From: PineRay
Date: Tue, 7 Feb 2012 17:34:20 +0900
Subject: [PATCH] Only consider the term which language is same with current language.

---
 .../custom_breadcrumbs_taxonomy.inc                |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.inc b/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.inc
index 13ee9b4..5c36aa4 100644
--- a/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.inc
+++ b/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.inc
@@ -187,6 +187,10 @@ function custom_breadcrumbs_taxonomy_node_get_lightest_term($node) {
         elseif ($term->vid != $vid) {
           continue;
         }
+        // Only consider the term which language is same with current language.
+        if (module_exists('i18n_taxonomy') && i18n_taxonomy_vocabulary_mode($vid) == I18N_MODE_TRANSLATE && $term->language != $GLOBALS['language']->language) {
+          continue;
+        }
         // If the term has parents, the weight of the term is the weight of the lightest parent.
         $parents = taxonomy_get_parents_all($term->tid);
         $depth = count($parents);
-- 
1.7.4.msysgit.0

