0

I'm working on a drupal 8 website. On every node the admin can choose wether or not to show a node in the main menu, and where it should be placed. This works great with the menu settings node form shown on every node edit page.

But at the moment I'm transforming the site to a multilingual website all is fine and via the menu settings node form it is possible to change the menu title but I can't choose to show a node in the menu for one language only.

So for example, I have a about England page that I want to show in the menu of my English site only and not in the menu of my Dutch site.

I thought it might be possible to only create an English node for this. But when I choose to add this English node to the menu it is shown in both my Dutch and English site even though there is no official Dutch version of the node. It's not official because I can't find it in the admin/content view but if you try to edit or show it it is there for some reason.

So for example when I create an English node with nid 62. When you want to see this you go to /en/node/62 but the url /node/62/ is also available and this is where the menu item on the Dutch site points to.

I also tried to have the node in both languages and unpublish one of them but then the menu item is removed from both menus.

Hope someone has a solutions for this, any suggestion is welcome. Thanks in advance.

6
  • since my default Language is Dutch, I can't without creating a Dutch node too. How come? Can’t you just select “English” on the node add form? Works for me
    – Clive
    Commented Jul 26, 2018 at 9:34
  • no strangely enough I can't I have the options not specified and not applicable
    – Joost
    Commented Jul 26, 2018 at 9:37
  • okay I solved the problem of not being able to select a language. I have the allowed_languages modules installed and had to select the allow all languages option first. So this selecting is possible now but creating a menu item in only one language is still not. I edited my question to give you a better idea of what is going wrong and what I tried.
    – Joost
    Commented Jul 26, 2018 at 10:10
  • I tend to use separate menus for each language - I've found far fewer problems doing it that way
    – Clive
    Commented Jul 26, 2018 at 10:11
  • Yes that would be a solution with fewer problems. But i find it not very user friendly to let my customers create and edit menu's with the core menu system in different menus per language, that is why I'm looking for a better and more user friendly way. Also because I'm not working with 2 but maybe 10 languages. So suggestions on this issue are still very much appreciated.
    – Joost
    Commented Jul 26, 2018 at 10:15

1 Answer 1

0

Okay the problem was that I used the Node view permissions module. Which works perfect but not for multilingual websites. That's why they also made Now view language permissions. By installing this and uninstalling the Node view permissions module the problem was solved.

Now it is possible to create a node and its translation and add them to the menu. By unpublishing the translation you see the default one in the menu and hide the translation from the menu in the other 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.