? translations
Index: i18ntaxonomy.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/i18n/i18ntaxonomy/i18ntaxonomy.module,v
retrieving revision 1.6
diff -u -p -r1.6 i18ntaxonomy.module
--- i18ntaxonomy.module	21 Feb 2008 20:14:23 -0000	1.6
+++ i18ntaxonomy.module	1 Jun 2009 14:59:45 -0000
@@ -657,4 +657,14 @@ function i18ntaxonomy_vocabulary($vid = 
   } else {
     return $options;
   }
+}
+
+/**
+ * Implemenation of hook_views_api().
+ */
+function i18ntaxonomy_views_api() {
+  return array(
+    'api' => '2.0',
+    'path' => drupal_get_path('module', 'i18ntaxonomy') . '/includes',
+  );
 }
\ No newline at end of file
Index: includes/i18ntaxonomy.views.inc
===================================================================
RCS file: includes/i18ntaxonomy.views.inc
diff -N includes/i18ntaxonomy.views.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ includes/i18ntaxonomy.views.inc	1 Jun 2009 14:59:45 -0000
@@ -0,0 +1,33 @@
+<?php
+// $Id$
+/**
+ * @file
+ * Views hooks.
+ */
+
+/**
+ * Implemenation of hook_views_handlers().
+ */
+function i18ntaxonomy_views_handlers() {
+  return array(
+    'handlers' => array(
+      'i18ntaxonomy_handler_field_taxonomy' => array(
+        'parent' => 'views_handler_field_taxonomy',
+        'file' => 'includes/i18ntaxonomy_handler_field_taxonomy.inc',
+      ),
+      'i18ntaxonomy_handler_field_term_node_tid' => array(
+        'parent' => 'views_handler_field_term_node_tid',
+        'file' => 'includes/i18ntaxonomy_handler_field_term_node_tid.inc',
+      ),
+      
+    ),
+  );
+}
+
+/**
+ * Implemenation of hook_views_data_alter().
+ */
+function i18ntaxonomy_views_data_alter(&$data) {
+  $data['term_data']['name']['field']['handler'] = 'i18ntaxonomy_handler_field_taxonomy';
+  $data['term_node']['tid']['field']['handler'] = 'i18ntaxonomy_handler_field_term_node_tid';
+}
\ No newline at end of file
Index: includes/i18ntaxonomy_handler_field_taxonomy.inc
===================================================================
RCS file: includes/i18ntaxonomy_handler_field_taxonomy.inc
diff -N includes/i18ntaxonomy_handler_field_taxonomy.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ includes/i18ntaxonomy_handler_field_taxonomy.inc	1 Jun 2009 14:59:45 -0000
@@ -0,0 +1,17 @@
+<?php
+// $Id$
+
+/**
+* Field handler to provide simple renderer that allows linking to a taxonomy
+* term.
+*/
+class i18ntaxonomy_handler_field_taxonomy extends views_handler_field_taxonomy {
+  function pre_render($values) {
+    foreach ($values as $key => $value) {
+      if (isset($value->term_data_name)) {
+        $t_name = tt('taxonomy:term:'. $value->term_data_tid .':name', $value->term_data_name);
+        $values[$key]->term_data_name = $t_name;
+      }
+    }
+  }
+}
\ No newline at end of file
Index: includes/i18ntaxonomy_handler_field_term_node_tid.inc
===================================================================
RCS file: includes/i18ntaxonomy_handler_field_term_node_tid.inc
diff -N includes/i18ntaxonomy_handler_field_term_node_tid.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ includes/i18ntaxonomy_handler_field_term_node_tid.inc	1 Jun 2009 14:59:45 -0000
@@ -0,0 +1,37 @@
+<?php
+// $Id$
+
+/**
+ * Field handler for terms.
+ */
+class i18ntaxonomy_handler_field_term_node_tid extends views_handler_field_term_node_tid {
+  function pre_render($values) {
+    $this->field_alias = $this->aliases['vid'];
+    $vids = array();
+    foreach ($values as $result) {
+      if (!empty($result->{$this->aliases['vid']})) {
+        $vids[] = $result->{$this->aliases['vid']};
+      }
+    }
+
+    if ($vids) {
+      $voc = '';
+      if (!empty($this->options['limit']) && !empty($this->options['vids'])) {
+        $voc = " AND td.vid IN (" . implode(', ', array_keys(array_filter($this->options['vids']))) . ")";
+      }
+
+      $result = db_query("SELECT tn.vid AS node_vid, td.* FROM {term_data} td INNER JOIN {term_node} tn ON td.tid = tn.tid WHERE tn.vid IN (" . implode(', ', $vids) . ")$voc ORDER BY td.weight, td.name");
+
+      while ($term = db_fetch_object($result)) {
+        $name = tt('taxonomy:term:'. $term->tid .':name', $term->name);
+        if (empty($this->options['link_to_taxonomy'])) {
+          $this->items[$term->node_vid][$term->tid] = check_plain($name);
+        }
+        else {
+          $this->items[$term->node_vid][$term->tid] = l($name, taxonomy_term_path($term));
+        }
+      }
+    }
+  }
+}
+
