On a multilingual website with i18n and menu translation, the breadcrumb title is not translated if I use breadcrumb reaction.

I've written a little patch that should solve this.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

plach’s picture

FileSize
1.03 KB

The patch from the OP works as advertised, I made some small improvement.

fxarte’s picture

I think another solution is to allow any module to tap into the breadcrumb reaction query. We can accomplish this by adding a tag to it, then implementing hook_query_alter.
Here is a patch that adds the tag.

function mymodule_query_alter(QueryAlterableInterface $query) {
  if ($query->hasTag('context_reaction_breadcrumb')) {
    $query->condition('language', array(LANGUAGE_NONE , $GLOBALS['language']->language), 'IN');
  }
}
iamEAP’s picture

Version: 7.x-3.0-beta1 » 7.x-3.x-dev
Category: task » bug

Cleaning up issue details.

iamEAP’s picture

Status: Needs review » Reviewed & tested by the community

Not sure that @fxarte's approach in #2 is appropriate; this should Just Work™ for admin without developer involvement.

With that being said the approach taken in #1 (and also the original patch) seems good. I applied and tested #1 and it worked as expected.

Marking the patch in #1 as RTBC.

iamEAP’s picture

And... Yup. This is still working great.

colan’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Committed #1 in a9116ab.

Status: Fixed » Closed (fixed)

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