Index: glossary.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/glossary/glossary.module,v
retrieving revision 1.100.2.20.2.42
diff -u -r1.100.2.20.2.42 glossary.module
--- glossary.module	6 Jun 2008 21:19:38 -0000	1.100.2.20.2.42
+++ glossary.module	1 Sep 2008 18:45:59 -0000
@@ -1004,7 +1004,14 @@
 
       // Get all glossary terms and attach synonyms.
       // Omit terms without a description. those are usually container terms.
-      $result = db_query(db_rewrite_sql("SELECT t.name, t.description, t.tid, COUNT(tn.nid) as nodes FROM {term_data} t LEFT JOIN {term_node} tn USING(tid) WHERE t.vid=%d GROUP BY t.tid, t.name, t.description ORDER BY LENGTH(t.name) DESC", 't', 'tid'), $vid);
+      // If multilingual taxonomy is enabled only show terms in current or no language
+      if(module_exists('i18ntaxonomy')) {
+      	global $language;
+      	$result = db_query(db_rewrite_sql("SELECT t.name, t.description, t.tid, COUNT(tn.nid) as nodes FROM {term_data} t LEFT JOIN {term_node} tn USING(tid) WHERE t.vid=%d AND t.language in ('', '%s') GROUP BY t.tid, t.name, t.description ORDER BY LENGTH(t.name) DESC", 't', 'tid'), $vid, $language->language);
+      }
+      else {
+      	$result = db_query(db_rewrite_sql("SELECT t.name, t.description, t.tid, COUNT(tn.nid) as nodes FROM {term_data} t LEFT JOIN {term_node} tn USING(tid) WHERE t.vid=%d GROUP BY t.tid, t.name, t.description ORDER BY LENGTH(t.name) DESC", 't', 'tid'), $vid);
+      }
       while ($term = db_fetch_object($result)) {
         if ($term->nodes) {
           // If there were any nodes attached, we need to see if they were unpublished.

