2

I would like to create a View (using the View module) to show my translated article separately according to the url path. Doing so, going to www.mysite.com/fr/blog should only show my article with the term "story" in french and going to www.mysite.com/en/blog should only show my article with the same term "story" in english.

  • I added an Entity translation relationship
  • I added an entity translation "language" set as "current user's language"

But none of my article are displayed on the views whatever the language path I use.

Here is my Views configuration:

Entity translation filter

Views configuration

Many thanks for your help!

1
  • Use a contextual filter based on the 1st argument (the language selection) and provide a default value if need be.
    – tenken
    Commented Mar 28, 2017 at 19:52

2 Answers 2

0

When 'FR' detected on Url default language of website will be changed So you have to Set it to Default Site Language

4
  • thanks for your answer. However, I tried and it does not fix the problem.
    – Benjamin
    Commented Mar 28, 2017 at 21:21
  • I tried both settings individually, then together: - putting language setting as "default site setting" in OTHER section didn't work - putting "Default site language" in entity translation FILTER didn't work - putting language setting as "default site setting" + filter didn't work neither.
    – Benjamin
    Commented Mar 28, 2017 at 21:24
  • @Benjamin you're welcome, So the problem is another place, I did similar jobs on several sites and they worked correctly. what is you language detection type in language settings?
    – Yuseferi
    Commented Mar 28, 2017 at 21:49
  • In « User interface text language detection », I enabled the URL detection method and configure it to « path prefix ». Then for the order, I have Default and User enabled in second and third position. Session and Browser are disabled. In « Content language detection », the settings are exactly the same, except that there is one more choice: « Interface », that is also «disabled ». Many thanks for your help!!
    – Benjamin
    Commented Mar 29, 2017 at 6:26
0

Use a contextual filter and set to use a url position if not provided. Use the 1st argument (the language selection) and provide a default value if need be.

EDIT:

Something like this: enter image description here

3
  • thanks for your answer. I'm not sure exactly what you are telling me here? When I write things in the "contextual filter", it adds things at the very end of the url. My url should be fr/blog and not blog/fr. Am I missing something?
    – Benjamin
    Commented Mar 28, 2017 at 21:23
  • see the edit to my post please.
    – tenken
    Commented Mar 28, 2017 at 21:53
  • Tank you @tenken, I tried the same config and am still having the same issue, none of my article shows up (not in english nor french).
    – Benjamin
    Commented Mar 29, 2017 at 6:38

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.