I'm working on a site that makes heavy use of i18n, and found that the gallery breadcrumbs in the node, gallery, and subgallery views are not being translated properly. I've managed to isolate one of the pain points in the gallery code for the node page, but suspect the other breadcrumbs are going to be Views-based patches as they appear to be generated by Views (if anyone knows otherwise let me know and I'll pursue those patches as well).

In the meantime, I have successfully applied the following patches to 6.x-1.0-beta5 to provide the following support in gallery node pages:

  1. Check for the existence of i18ntaxonomy.module
  2. If available, check the gallery vocabulary for localization using i18ntaxonomy.module
  3. If everything checks out for i18n taxonomy support, set an internal flag and apply i18n translations to breadcrumb strings where necessary

Feedback from anyone else having this particular problem would be great as I've had no luck finding anything in the issue queue or the forums...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

arpieb’s picture

Sorry, I forgot to point out these patches also take care of the translation of gallery names in the subgallery list pages... The only breadcrumb remaining untranslated after applying these patches is the Views-based gallery with image thumbnails (View name image_gallery).

joachim’s picture

Status: Active » Needs work

This doesn't address Views galleries, but as pointed out in #431344: Image gallery term translations not displayed, that's not our problem.

Needs to be rolled as a single patch from the base folder of the image package.

+++ image_gallery.pages.inc	2010-08-01 01:23:15.000000000 -0500
@@ -61,6 +61,12 @@
+    $use_i18n = FALSE;
+    if (module_exists('i18ntaxonomy') && i18ntaxonomy_vocabulary($vid)) {
+      $use_i18n = TRUE;
+    }

Argh. I hate this kind of nonsense that PHP requires us to do. I'd rather we said:

// Determine whether we should use translation for galleries.
$use_i18n = (module_exists('i18ntaxonomy') && i18ntaxonomy_vocabulary($vid));

I don't know that much about how translation works (except that every time I install it I find the UI completely crazy). So I'd appreciate reviews from actual users.

Powered by Dreditor.

steff2009’s picture

Hi Joachim, can you explain a little better what we need to do with the patch you posted?

Create a file called image_gallery.pages.in containing your code below and upload it into the image package folder?

+++ image_gallery.pages.inc	2010-08-01 01:23:15.000000000 -0500
@@ -61,6 +61,12 @@
+    $use_i18n = FALSE;
+    if (module_exists('i18ntaxonomy') && i18ntaxonomy_vocabulary($vid)) {
+      $use_i18n = TRUE;
+    }

Thanks for your help, cheers.

joachim’s picture

See http://drupal.org/patch/apply for help on applying a patch. But note as I say the patches will not apply properly because they've not been made in the correct manner.