Hi,
I've installed Mixitup Views module to my Drupal installation. I have tried to show the filter tags by the current user interface language, but it's just showing in main site language, although I have translated the taxonomy terms.
I found some patch and it seems works well: checking if the term has translation from the current context:
$translated_term = \Drupal::service('entity.repository')->getTranslationFromContext($term, $language);
$termList[$tid] = $translated_term->getName();
Can you look if there's another way to do that?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | mixitup_views-translate_filte-3156714-2.patch | 3.42 KB | yannickbaettig |
Comments
Comment #2
yannickbaettig commentedComment #3
yannickbaettig commentedComment #4
ysamoylenko commentedThe patch looks good to me. Thanks for implementing it.
Comment #6
ysamoylenko commentedThe changes have been committed.