Index: hierarchical_select.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hierarchical_select/hierarchical_select.module,v
retrieving revision 1.161
diff -u -p -r1.161 hierarchical_select.module
--- hierarchical_select.module	6 Apr 2009 14:45:32 -0000	1.161
+++ hierarchical_select.module	21 Jul 2009 10:07:07 -0000
@@ -1227,6 +1227,9 @@ function _hierarchical_select_setup_js()
 
     $url = base_path();
     $url .= variable_get('clean_url', 0) ? '' : 'index.php?q=';
+    if (module_exists('i18ntaxonomy')) {
+      $url .= i18n_get_lang() .'/';
+    }
     $url .= 'hierarchical_select_json';
 
     // Add the CSS and JS, set the URL that should be used by all hierarchical
Index: modules/hs_taxonomy.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hierarchical_select/modules/hs_taxonomy.module,v
retrieving revision 1.33
diff -u -p -r1.33 hs_taxonomy.module
--- modules/hs_taxonomy.module	18 Jul 2009 12:54:18 -0000	1.33
+++ modules/hs_taxonomy.module	21 Jul 2009 10:07:18 -0000
@@ -194,8 +194,14 @@ function hs_taxonomy_form($vid, $value =
   require_once(drupal_get_path('module', 'hierarchical_select') .'/includes/common.inc');
 
   $vocabulary = taxonomy_vocabulary_load($vid);
-  $title = check_plain($vocabulary->name);
-  $description = ($help) ? $help : $vocabulary->help;
+  if (module_exists('i18ntaxonomy')) {
+    $title = check_plain(tt("taxonomy:vocabulary:$vid:name", $vocabulary->name));
+    $description = ($help) ? $help : tt("taxonomy:vocabulary:$vid:help", $vocabulary->help);
+  }
+  else {
+    $title = check_plain($vocabulary->name);
+    $description = ($help) ? $help : $vocabulary->help;
+  }
 
   $form_item = array(
     '#type'          => 'hierarchical_select',
@@ -396,7 +402,12 @@ function hs_taxonomy_hierarchical_select
   if (!isset($labels[$item])) {
     $term = taxonomy_get_term($item);
     // Use the translated term when available!
-    $labels[$item] = t($term->name);
+    if (module_exists('i18ntaxonomy') && i18ntaxonomy_vocabulary($term->vid) == I18N_TAXONOMY_LOCALIZE) {
+      $labels[$item] = tt("taxonomy:term:$term->tid:name", $term->name);
+    }
+    else {
+      $labels[$item] = t($term->name);
+    }
   }
 
   return $labels[$item];
@@ -745,7 +756,12 @@ function _hs_taxonomy_hierarchical_selec
   $options = array();
   foreach ($terms as $key => $term) {
     // Use the translated term when available!
-    $options[$term->tid] = t($term->name);
+    if (module_exists('i18ntaxonomy') && i18ntaxonomy_vocabulary($term->vid) == I18N_TAXONOMY_LOCALIZE) {
+      $options[$term->tid] = tt("taxonomy:term:$term->tid:name", $term->name);
+    }
+    else {
+      $options[$term->tid] = t($term->name);
+    }
   }
   return $options;
 }
