I have a multilingual installation realized with i18n. Two languages are set up: German and English. The Taxonomy-vocabulary "Tags" i set up with no language so the free tagging input and the taxonomy menu shows up on both languages. The terms within this vocabulary are either German or English and linked via translation through i18n. If the tagcloud is called by en/tagadelic/MODE/NUMBER or de/tagadelic/MODE/NUMBER all terms of both languages are visible.

I didn't look through the code, so I don't really know if that is more an i18n-topic.

--
Felix aka YAFA

CommentFileSizeAuthor
#3 tagadelic_i18n.patch_1.txt618 bytesjanusman

Comments

YAFA’s picture

Title: Internationalization (i18n) compatibility » Tagsize by average hits per tag

I wanted to post another feature-request and posted a comment. Delete or ignore this.

YAFA’s picture

Title: Tagsize by average hits per tag » Internationalization (i18n) compatibility

Changed the Issue title with the comment... Now changed back... Sorry for confusion

janusman’s picture

Version: 5.x-1.x-dev » 5.x-1.0
StatusFileSize
new618 bytes

I have a patch for 5.x-1.0 that works with i18ntaxonomy.module -- that must be enabled for this to work.

--- tagadelic.module_orig       2008-06-11 12:02:52.609072000 -0500
+++ tagadelic.module    2008-06-11 12:05:11.778240000 -0500
@@ -283,7 +283,10 @@
  */
 function theme_tagadelic_weighted($terms) {
   foreach ($terms as $term) {
-    $output .= l($term->name, taxonomy_term_path($term), array('class'=>"tagadelic level$term->weight", 'rel'=>'tag')) ." \n";
+    $name = $term->name;
+    if (module_exists("i18ntaxonomy"))
+      $name = t($term->name);
+    $output .= l($name, taxonomy_term_path($term), array('class'=>"tagadelic level$term->weight", 'rel'=>'tag')) ." \n";
   }
   return $output;
 }
hansrossel’s picture

Thanks, the patch looks easy and promising, but is unfortunately not working for me. I'm using also panels2 so will check what else could influence it.

Because you are changing a theme function I would rather override it in template.php so it is still working when upgrading the module:

In template.php:

/**
 * Tagadelic module: theme function that renders the HTML for the tags
 * Make terms language dependend when using i18ntaxonomy module
 */
function phptemplate_tagadelic_weighted($terms) {
  foreach ($terms as $term) {
    $name = $term->name;
    if (module_exists("i18ntaxonomy")) {
      $name = t($term->name);
      }
    $output .= l($name, taxonomy_term_path($term), array('class'=>"tagadelic level$term->weight", 'rel'=>'tag')) ." \n";
    }
  return $output;
}
Bèr Kessels’s picture

This is not the proper solution.
You should not have to modify every module in order to make another (i18ntaxonomy) work.

Can you please see if we maybe use a wrong API, so that i18n cannot override our tags?

Bèr Kessels’s picture

Bèr Kessels’s picture

Status: Active » Closed (duplicate)