Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | multilingual_facet-2374361-1.patch | 658 bytes | gaurav.goyal |
Comments
Comment #1
gaurav.goyal CreditAttribution: gaurav.goyal commentedThis patch worked for me..!!
Comment #2
cmseasy CreditAttribution: cmseasy commented$bundle_label = module_exists('i18n_node') ...............
Does not work for entity translation.
Comment #3
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commentedIn my case 'include default facets' is always FALSE, and the corresponding code is not launched. So, it requires deeper investigation.