Index: hierarchical_select.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/hierarchical_select/hierarchical_select.module,v retrieving revision 1.167 diff -u -p -r1.167 hierarchical_select.module --- hierarchical_select.module 4 Aug 2009 22:34:18 -0000 1.167 +++ hierarchical_select.module 14 Aug 2009 17:50:44 -0000 @@ -1292,6 +1292,9 @@ function _hierarchical_select_setup_js() $url = base_path(); $url .= variable_get('clean_url', 0) ? '' : 'index.php?q='; + if (module_exists('i18n')) { + $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.34 diff -u -p -r1.34 hs_taxonomy.module --- modules/hs_taxonomy.module 29 Jul 2009 20:48:41 -0000 1.34 +++ modules/hs_taxonomy.module 14 Aug 2009 17:50:52 -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; }