There's a missing t() in hook_block_view.

t($voc->name)

CommentFileSizeAuthor
tagcloud_fix_multiglingual_block_title.patch761 bytesmpp

Comments

MGParisi’s picture

Im attempting to confirm that the taxonomy is infact translated with the standard t() and not some built in resource. So far it looks like the problem was easy to solve and a t() is needed. Can you confirm this is the case?

MGParisi’s picture

Status: Patch (to be ported) » Needs review

Pushed it to Dev release

MGParisi’s picture

This translates the term name but not the term description.

sahuni’s picture

Not working for me (vocabulary is localized, English is not the default language).
Not only the bloc title, but also the term name, the term description etc....

From what I read, the t() function is inadequate for taxonomy.
In my online website, I hacked your module (7.1.3) like this, in theme_tagclouds_weighted() in order to have term in good language

$ner_tid = $term->tid;
$ner_name = $term->name;
$ner_textgroup = "taxonomy:term:$ner_tid:name";
$ner_tname =  i18n_string_translate($ner_textgroup, $ner_name, $options);
$output .= "<span class='tagclouds-term'>" . tagclouds_display_term_link_weight($ner_tname, $term->tid, $term->weight, $term->description) . "</span>\n";

it works for my case, but I'm aware that multilingual recover a lot of different configurations.

Nothing beeing perfect, I reported following issue http://drupal.org/node/1575150 with accentuation in description when mouse over term name.

MGParisi’s picture

Im out of my element here since I don't have a multi-language setup (I don't even know another language), and as you pointed out it seems that the localization is handled by the i18n plugin's. I can see the Dev version translation files filling up with taxonomy terms. I am going to mark the dev version as unstable (which it is suppose to be), until we can come up with a proper solution.

scito’s picture

The t() should not be used to translate variables as this is proposed in the patch, see API reference: t().

I've created an i18n feature request #1696498: Add i18n support for taxonomy terms.

MGParisi’s picture

Thanks, good thing I did not push this to release.

Ill have to re-install git and fix this in dev as soon as I get a moment. It is NOT in release.

MGParisi’s picture

Status: Needs review » Fixed

Should be in latest dev release, when it gets published!

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

correct hook

  • Commit 947dc61 on 7.x-1.x, 8.x-1.x by MGParisi:
    Issue #1567056 by mpp: Vocabulary title not translated in tagcloud block...