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.
If someone wants to show the term translated with this module, must edit the function (into the file: global_filter.widgets.inc):
function _global_filter_add_terms(&$options, $vocabulary_machine_name, $show_depth = TRUE)
The line:
$options[$term->tid] = $show_depth ? (str_repeat('-', $term->depth) . $term->name) : $term->name;
must be changed with:
$options[$term->tid] = $show_depth ? (str_repeat('-', $term->depth) . i18n_taxonomy_term_name($term)) : i18n_taxonomy_term_name($term);
Please, add this code to the new version for fix the multilanguage issue.
Comment | File | Size | Author |
---|---|---|---|
#3 | global_filter.widgets.i18n_taxonomy.patch | 638 bytes | csedax90 |
Comments
Comment #1
RdeBoerThanks for this Crisitan
Applied with attribution (your first acknowledged patch, see https://drupal.org/user/1343484 !).
The code will only work when the i18n_taxonomy submodule in the "Internationalization" module is enabled so I modified your code a little to take care of this:
Thanks again,
Rik
PS: in the future it would be even more helpful to the maintainer if you could create a proper patch, see https://drupal.org/node/367392
Comment #2
RdeBoerComment #3
csedax90 CreditAttribution: csedax90 commentedI've seen that in the latest stable version of the module, our multi language approach is not included, so i've created a patch (it's my first patch so I hope it goes well...)
Thanks for RdeBoer for the latest part
Comment #4
alanburke CreditAttribution: alanburke at Annertech commentedPatch working as advertised - thanks.
Comment #5
RdeBoerSo sorry i completely forgot to apply!
Will do that when i am next to a computer.
Comment #6
RdeBoerActually it was committed with attribution in March 2014 and thus available in 7.x-1.x-dev, but not official, until today.... I've just created 7.x-1.13
Original commit:
https://www.drupal.org/commitlog/commit/30274/7f268703ee436292701d14dd38...