Bundle names appearing in "Filter by type" Facet does not support translation.

On a bit debugging I found modifying facetapi_map_bundle() to support i18n will do the work.

foreach ($options['entities'] as $entity_type) {
    if ($info = entity_get_info($entity_type)) {
      foreach ($info['bundles'] as $bundle_name => $bundle_info) {
        $bundle_label = module_exists('i18n_node') ? i18n_node_type_name($bundle_name, $bundle_info['label']) : $bundle_info['label'];
        $names[$bundle_name] = $bundle_label;
      }
    }
  }

Will update the patch too.

CommentFileSizeAuthor
#1 multilingual_facet-2374361-1.patch658 bytesgaurav.goyal
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gaurav.goyal’s picture

This patch worked for me..!!

cmseasy’s picture

$bundle_label = module_exists('i18n_node') ...............
Does not work for entity translation.

eugene.ilyin’s picture

Status: Needs review » Postponed (maintainer needs more info)

In my case 'include default facets' is always FALSE, and the corresponding code is not launched. So, it requires deeper investigation.