Menu selected on sitemap does not show translated links

Created on 5 June 2025, 2 days ago

Hi team

I have sitemap page created with front and main navigation link on Drupal 10 website.
On my multilingual website when the sitemap is visited from different language , it should show the menu links translated on that particular language.
Currently it shows all the link on all languages.
Sitemap and menu translation provides no help.
Tried updating to latest version as well, still same result

Regards
Divya

📌 Task
Status

Active

Component

Code

Created by

🇮🇳India divya.lakshman

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @divya.lakshman
  • 🇨🇦Canada mparker17 UTC-4

    Hi Divya, thanks for reporting this!

    The issue that you described sounds a bit like the issue reported in Filter Menu Tree By Language Needs work

    The patch in 3085218 needs to be updated before i can recommend that you try it. If you feel comfortable updating the patch yourself, that would be great! But if you would prefer, i can update the patch later today and let you know when it is ready to try.

  • 🇨🇦Canada mparker17 UTC-4

    @divya.lakshman,

    Apologies for the delay. I created a patch from @berramou in #3085218-20: Filter Menu Tree By Language but it didn't work for me: after installing the right module ( Menu Manipulator ), it crashed my site: see my comment in that ticket. Apparently, the same maintainer (@matthieuscarset) also created Menu Manipulator Sitemap , but that module is independent from this module.

    While working on that, I did find a work-around that might work for you depending on your site...

    1. Go to /admin/config/regional/content-language. At the top of the page, check Custom menu link to make them translatable. This will cause a Custom menu link details-element to appear further down the page. You can leave most configuration in that Custom menu link details element at their default values, but I unchecked "Changed" because it didn't seem like that needed to be translatable for my tests. I clicked Save configuration on that page.
    2. Go to /admin/structure/menu, edit a menu, and edit a menu link. Click the Translate tab at the top of the page. Click Add next to the language(s) that you want to translate that menu link into. Enter a translation and save.
    3. Add translations for a handful of menu items for testing. You will want to repeat for all menu items eventually.
    4. Go to /sitemap and use the language switcher. You should see the translated text for the menu items that you entered translations for change based on the current language.

    This work-around might be sufficient for your use-case if:

    1. All of your menu links are custom menu links (i.e.: they were added manually, i.e.: they are not added by a module).
    2. You want exactly the same menu items in exactly the same order for all translations.

    To make it a bit easier for me to manage this module's issue queue, I'm going to change this issue's status to Postponed (maintainer needs more info), but you can change it back...

    If the patch in #3085218-20: Filter Menu Tree By Language works for you, please let me know by posting that here, and change this issue's status to Fixed

    If 3085218 seems unrelated, then please post that here, change this issue's status back to Active, and I will try to help further (I'll probably ask for steps to reproduce!)

    If you figure out a solution to your problem (i.e.: Menu Manipulator Sitemap works for you, or my Content-translation work-around works for you), please post that here, and change this issue's status to Fixed.

    If I don't hear back from you in ~6 months or so, then I will close this issue as Closed (cannot reproduce) to make it easier for me to manage the other issues in this issue queue.

    Thanks for your understanding!

  • 🇮🇳India divya.lakshman

    Hi mparker17

    Thanks for detailed explanation. I have custom links translated and even the menu ,but still the link specific to that language is not seen on the sitemap page.

    I do not use the menu_manipulator module.

    Steps taken

    1. updating sitemap to latest version still same issue.
    2. I have enabled Translation for Sitemap, Custom menu link, Menu

    Module used
    Sitemap.
    Menu Multilingual

    The menu multilingual configuration is enabled on my main navigation and it show only translated menu.
    The same menu when used on sitemap shows all links

    Thanks
    Divya

  • 🇨🇦Canada mparker17 UTC-4

    Ah, interesting, I don't think I've used the Menu Multilingual module before... I'll try it out on a test site and see if I can reproduce a problem. Thank you!

Production build 0.71.5 2024