Download & Extend

Add i18n support for taxonomy terms

Project:TagCloud
Version:7.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)
Issue tags:i18n compatibility

Issue Summary

Taxonomy terms are not translated or localized in tagclouds. I suggest adding i18n support.

The i18n API can be used for this task, useful methods:

<?php
 
if (module_exists('i18n_taxonomy')) {
   
$language = i18n_language();
  }

  if (
module_exists('i18n_taxonomy')) {
   
$term_name = i18n_taxonomy_term_name($term, $language);
  } else {
   
$term_name = $term->name;
  }
?>

There are many modules using i18n that can be used as examples.

Comments

#1

Can you create a .PATCH?

#2

I've written a patch. I haven't tested extensively. My basic use case works.

Further, I've removed trailing whitespace.

AttachmentSize
i18n_1696498_2.patch 7.04 KB

#3

Status:active» needs review

#4

I've filed an issue to i18n in order to add *_description methods: #1704658: Provide taxonomy description translation, unfiltered name and description..

#5

Scito, would you like to be a co-maintainer on this project to maintain the translations? Also have you tested the dev version, I would like to release 1.5 before I move onto translations, but I have gotten no feedback on the Dev versions stability.

#6

Actually, I'm using the current TagClouds dev version including this i18n patch on my production site. For me it's working smooth. No problems detected so far. (However, my site is only a low traffic blog.)

Co-maintainer sounds great! Do you mean I should maintain the i18n stuff of TagClouds?

I think in general it's not a big deal, except new major Drupal releases.

Do you know the procedure for applying for co-maintainership?

#7

Do you have git access? If not you have to put in an application in the Webmasters Queue for it, or talk on IRC about it.

I can add you, but lets release the current codebase as 1.5 and then add i8n support for 1.6 branch.

#8

Added you as a co-maintainer.

#9

I've setup git for Drupal. Should I commit the patch?
Should I wait until the critical bug #1705418: New Tags Not Appearing in Cloud is resolved?

#10

I dont have time to resolve that bug, right now. Its on a priority list but I have to get at it. Maybe I will look at it tomorrow.

#11

Wait for new dev version, I think its solved

#12

The New Dev Is Up!

#13

Want to apply the taxonomy fixes to 1.6 and make it dev?

#14

OK, I'll do commit it soon.

#15

Status:needs review» fixed

I've cleaned trailing whitespace before committing this i18n patch since my editor always cleans trailing whitespace.

I had to merge my patch with the latest changes. Some lines are affected by both patches.

Finally, committed and pushed to 7.x-1.x.

I hope everything went well in first Drupal commit.

BTW: I've found another issue: #1757746: Warnings and notices if a passed vocabulary vid does not exist

#16

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here