I know it's old hat to offer a patch against the 5.x module but it is still being used!

If the i18n translation module is installed, tags ought to be shown in the user's selected language. This patch checks if the i18n module is installed and then adds a language check into the tagadelic_get_weighted_tags() function's SQL lookup. The language-specific tag cloud data is then cached per language. Nice and simple.

CommentFileSizeAuthor
#1 tagadelic.patch1.55 KBjoe-b
tagadelic.patch1.49 KBjoe-b

Comments

joe-b’s picture

StatusFileSize
new1.55 KB

Of course we need to check for both the i18n and i18ntaxonomy modules - dang! New patch.

frank ralf’s picture

Version: 5.x-1.1 » 6.x-1.2

I applied this patch successfully against 6.x-1.2. Changing version so users of the current version might test it.

joe-b’s picture

Thanks, Frank.

Bèr Kessels’s picture

Version: 6.x-1.2 » 6.x-1.x-dev

should be tested against -dev

depcam’s picture

I tried the patch and It didn't worked against 6.x-1.2, I'll try it against 6.x-1.x-dev

srobert72’s picture

Very good news !!
I think lot of users wait for such a patch.

depcam’s picture

I can't make the patch work against 6.x-1.x-dev 2009-Sep-15 which seem to include some sort of language management.

strellman’s picture

subscribing

frank ralf’s picture

@depcam

Your're right. Line 214 ff. of tagadelic.module uses the $language variable for building the $options string:

function tagadelic_get_weighted_tags($vids, $steps = 6, $size = 60) {
  // build the options so we can cache multiple versions
  global $language;
  $options = implode('_',$vids) .'_'. $language->language .'_'. $steps .'_'. $size;

...

However, the subsequent SQL query doesn't seem to cater for the language setting.

Have you tried whether 6.x-1.x-dev shows the desired behavior even without this patch?

agrigor1’s picture

The 6.x-1.x-dev doesnt do the job.
No localized terms.
Any new idea?
Does the patch work in 6.x-1.2?

frank ralf’s picture

Should, see #2 above ;-)

Bèr Kessels’s picture

Status: Needs review » Closed (duplicate)