Hi everyone,
I'm currently working on a site in 4 languages. I have added custom language switcher links in my template that links to:
- the translation if the node is translated
- the original node with the language prefix if the node is not translated (and then I show a warning message above the content)
To make it clearer I'll add an example:
An English page (node/1) has a Dutch translation (node/2) and NO translation in French and German.
The language switcher links to:
- EN (en/node/1)
- NL (nl/node/2)
- FR (fr/node/1)
- DE (de/node/1)
The problem that occurs is the following: when I switch to FR or DE (so fr/node/1 or de/node/1) the interface gets translated (because of the language prefix in the URL), but the Primary links remain the English ones.
When switching to NL (for which a translation of this page exists) everything works correctly: the interface AND the primary links switch.
Does anyone have an idea on how to make the Primary Links switch together with the interface language? I have tried several options, but I can't seem to figure it out...
I also can't seem to find out where he filters the primary_links on the current language. I believe it's in this part that something goes wrong: the global variable language switches correctly when changing the language, but the primary links that are loaded seem to be related to the NODE language (and not to the interface language)...
Any help would be very appreciated!
Thanks
Koen