Menu item disappears when url is not a page

I have a language selector on my nav menu that works just fine,… As long as the url points to a specific page, ie the homepage or /about page etc. But if go to any page, ie /post or /tags /categories etc. then the language selector disappears. I’m baffled. I’ve tried reworking the nav-menu.html page and looked at my single.html and list.html and can’t figure out what is happening. Any suggestions appreciated.

Try something like this:

{{ $langPage := cond (gt (len .Translations) 0) . .Site.Home }}
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
	{{ $langPage.Language.LanguageName }}
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
	{{ range $langPage.Translations }}
	<a class="dropdown-item" href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a>
	{{ end }}

Ok Super thanks for the reply. I finally found the problem. in my config. i had something that was syntactically correct but functionally wrong.

         - name
          - name

So once I put main, navbar, togglelang all under menu, we are good to go.