# Suggestion for simple language navigator/switch

**URL:** <https://discourse.gohugo.io/t/suggestion-for-simple-language-navigator-switch/13206>\
**Category:** support\
**Created:** [July 27, 2018, 9:57am UTC](https://discourse.gohugo.io/t/suggestion-for-simple-language-navigator-switch/13206 "2018-07-27T09:57:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boyd\_Kelly](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/boyd_kelly/32/9034_2.png) [@Boyd\_Kelly](https://discourse.gohugo.io/u/Boyd_Kelly)\
**Post date:** [July 27, 2018, 9:57am UTC](https://discourse.gohugo.io/t/suggestion-for-simple-language-navigator-switch/13206/1 "2018-07-27T09:57:31Z")

</div>

Hi,

I’m having problems with getting a simple (two langage) navigator. I’m not a programmer so I first tried the hugo-bootstrap-premium theme which is multilingual, but when I follow the setup guide, even with the example site, the language switcher doesn’t work.

I then tried to do something with menus with the following:

```
    cat language.md
---
date: 2018-03-10
linktitle: "Français" 
draft: false
menu:
  main:
#prev: /
title: "Français"
weight: 10
url: /fr

```

And

```
cat language.fr.md 
---
date: 2018-03-10
linktitle: "English" 
draft: false
menu:
  main:
#prev: /
title: "English"
weight: 10
url: /
---

```

It switches nicely from English to French, but not back. I tried changing the url to /en as well but the top menubar stays in French. (even thought the url shows localhost:1313/) Maybe some caching or something? Or on the other hand, once the site is in French, the “English” menu appears, but when I hover over it, then it shows in the browser bottom left that it effectively wants to go to localhost:1313/fr.

Can someone point me to a tutorial that can help a junkyard cut and paste programmer to get a language navigator working? Thanks!!!

---

<div class="post-metadata">

**Author:** ![regis](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/regis/32/4958_2.png) [@regis](https://discourse.gohugo.io/u/regis)\
**Post date:** [July 27, 2018, 10:38am UTC](https://discourse.gohugo.io/t/suggestion-for-simple-language-navigator-switch/13206/2 "2018-07-27T10:38:51Z")

</div>

Not sure if you can add a language sWitcher to à Hugo menu, I would guess not. But you can try and add the following to your templates.

```
{{ range .Translations }}
	<a href="{{ .Permalink }}">{{ .Lang }}</a>
{{ end}}
```

---

<div class="post-metadata">

**Author:** ![Boyd\_Kelly](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/boyd_kelly/32/9034_2.png) [@Boyd\_Kelly](https://discourse.gohugo.io/u/Boyd_Kelly)\
**Post date:** [July 28, 2018, 9:47am UTC](https://discourse.gohugo.io/t/suggestion-for-simple-language-navigator-switch/13206/3 "2018-07-28T09:47:47Z")

</div>

Thank you very much! I put in the header.html and it works. It would be so nice for newbies like me to be able to define a (dropdown) menu item to refer to this.

---

<div class="post-metadata">

**Author:** ![regis](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/regis/32/4958_2.png) [@regis](https://discourse.gohugo.io/u/regis)\
**Post date:** [July 28, 2018, 12:35pm UTC](https://discourse.gohugo.io/t/suggestion-for-simple-language-navigator-switch/13206/4 "2018-07-28T12:35:48Z")

</div>

You can use `.AllTranslations`. This one returns the current translation along the other ones.

See the [doc](https://gohugo.io/content-management/multilingual/#list-all-available-languages) for more info on this. All your questions seem to be answered there.
