To translate term and vocabulary names, I basically added these two lines

$termname = tt('taxonomy:term:'. $tid .':name', $termname);

$vocabname = tt('taxonomy:vocabulary:'. $vid .':name', $vocabname);

in theme_multi_taxonomyblock and taxonomy_recursive_array_builder, but maybe more functions are affected.

Could it be useful for other users, as well?

CommentFileSizeAuthor
#4 taxonomyblocks-i18n.patch1.33 KBtomamic

Comments

PixelClever’s picture

Does this function work correctly when i18n is not installed? If it doesn't then it could cause problems unless we check to see if the function exist before running it. By the way where is the api page for the tt() function? I couldn't find it.

PixelClever’s picture

Status: Active » Postponed (maintainer needs more info)
tomamic’s picture

You're right, Aaron. A check is necessary:

if (module_exists('i18nstrings')) {
  $variable = tt('configuration:mymodule:mykey', $variable);
}

See: http://groups.drupal.org/node/15177

Haven't I said? Great module! Thanks :-)

tomamic’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1.33 KB

I searched through the module, and I haven't found other localization issues. Attached patch degrades gracefully if tt doesn't exist.

PixelClever’s picture

Status: Needs review » Fixed

Added in version 2.2. Be sure to visit Update.php if you are upgrading from any version earlier than 2.0.

Status: Fixed » Closed (fixed)

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