The main language of my blog is in pt-br (Brazilian Portuguese). Since I only/ want to support one other language, I thought adding a menu link to English would suffice. However, some menu links don’t work as I expect.
For example, I’ll open the page and click “English version”. Everything under /posts/, /about/ and /license/ works. I am unable to change the language back to Portuguese by clicking “Versão em português”. The other problem is that if I click at the “Home” menu link or the link in the profile picture, I’ll go back to the main language, when the expected behavior is that I would go back to the homepage of that specific language.
Here’s the repo: GitHub - Tetizera/temporary-repo-jwaghelli
Here’s the relevant section in the config.toml file:
[languages]
[languages.pt-br]
description = "Olá! :)"
languageName = "Brazilian Portuguese"
languageCode = "pt-br"
title = 'Blog do Tet'
weight = 10
[languages.pt-br.menu]
[[languages.pt-br.menu.main]]
url = '/'
weight = 0
[[languages.pt-br.menu.main]]
identifier = "posts"
name = "Posts"
url = "/posts/"
weight = 10
[[languages.pt-br.menu.main]]
identifier = "Sobre"
name = "Sobre"
url = "/about/"
weight = 30
[[languages.pt-br.menu.main]]
identifier = "Licença"
name = "Licença"
url = "/licença/"
weight = 40
[[languages.pt-br.menu.main]]
identifier = "versão en"
name = "English version"
url = "en"
weight = 50
[languages.en]
description = "Hi! :)"
weight = 0
title = "Tet's Blog"
languageCode = "en"
languageName = "English"
[languages.en.menu]
[[languages.en.menu.main]]
title = 'Tet Blog'
url = '/en/'
weight = 0
[[languages.en.menu.main]]
identifier = "posts"
name = "Posts"
url = "/en/"
weight = 10
[[languages.en.menu.main]]
identifier = "About"
name = "About"
url = "/about/"
weight = 30
[[languages.en.menu.main]]
identifier = "License"
name = "License"
url = "/licença/"
weight = 40
[[languages.en.menu.main]]
identifier = "pt-br version"
name = "Versão em Português"
url = "/"
weight = 50