Per language menu item settings in node forms

26/07/2018


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.

قالب وردپرس