0

I have a site with two languages (EN/FR). I have a Content Type (Article). I have a Block built with Views that is displayed on the Article Node page. This Views Block has a translation.

When the user switches to FR, all other Blocks and UI components detect and render in this language. Even if the user visits a node that does not have a FR translation, it will render the rest of the site in FR.

However, Views Blocks do not seem to adhere to the selected language. I must be missing something?

When a user changes the language of the site to FR, all translated interfaces should adhere to that, no?

6
  • Views blocks consist of two translatable parts - the configuration (the view) and the content. You have to translate the configuration through the interface, have you don this? Or is the content of the block the wrong language? If so, you'll have to add a filter for the content language.
    – Jaypan
    Commented Feb 28, 2022 at 5:47
  • Hmm... I don't know - I added translations in the Tab in the view-edit page that reads "Translate View". Regarding adding a filter: I would like the Views Block to display the user's selected language instead of the node's language. For example, if the node is only in EN, and the user is set to FR, I still want the FR version of the Views Block to show. Any help would be appreciated.
    – ymdahi
    Commented Feb 28, 2022 at 15:34
  • You'll need to set the filter on the content language then, and set it to use the current interface language.
    – Jaypan
    Commented Feb 28, 2022 at 15:47
  • Any chance you have a few minutes to walk me through this? I can pay you for your time.
    – ymdahi
    Commented Feb 28, 2022 at 16:00
  • You should remove your address. You'll get spammed! I'll try to post an answer below later
    – Jaypan
    Commented Feb 28, 2022 at 16:01

1 Answer 1

1

In the view, add a new filter on 'translation language', and then for the filter, check the 'Interface text language selected for page' box, and save the view. This will filter the content of the view to the current language.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.