Not working on multi lingual site. Translation is not working when switching between languages.

Created on 6 November 2017, about 7 years ago
Updated 22 March 2024, 10 months ago

I have installed this module and created a view and added in an exposed form of taxonomy term. My site is multi lingual and I have translations for the above mentioned taxonomy terms. The problem is when I try to switch between languages the language is not switching and showing the default language.

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇮🇳India aby v a

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇵🇱Poland gugalamaciek

    Consider scenario:
    1. Open node page using shs. Terms are cached based on interface langauge (e.g. langA)
    2. Open translations form. Data is get based on interface language (in most cases the same as in point 1.). So you create translation to langB, but you see term labels in langA.

    What can be done is to change caching strategy from interface to content. So change this:

    $this->contexts = ['languages:language_interface', 'user.roles'];

    into this:

    $this->contexts = array_merge(['languages:' . LanguageInterface::TYPE_CONTENT, 'user.roles']);

    Terms are content, not interface. They should take into account content langauge, not interface langauge.

    Proposed patch provides this change.

  • Status changed to Needs review 12 months ago
  • 🇨🇦Canada joseph.olstad

    This patch still applies cleanly to 2.0.x

    With that said, does this patch work with AND without translation?

Production build 0.71.5 2024