Hello all, first time I am trying multilanguage feature for one of my clients and I’ve succeed so far except the menu. Everything else including content is changing but the menu will not be translated.
I am using Hugo v0.55.6/extended and here is my config.toml file.
baseURL = “/”
languageCode = “en-us”
title = “New Site Title”
themesDir = “…/…”
defaultContentLanguage = “en”
defaultContentLanguageInSubdir = true
[menu]
[[menu.main]]
name = “Home”
url = “/”
weight = 1[[menu.main]]
name = “About Us”
url = “/about/”
weight = 2[[menu.main]]
name = “News”
url = “/news/”
weight = 3
If I add [[menu.main]] like above I can see the menu and it will work but it will not be translated. Without it, the menu will not be visible if I use only the languages settings below.
[Languages.en]
title = “New Site Title English”
weight = 1
languageName = “English”[[languages.en.menu.main]]
name = “Home”
url = “/”
weight = 1[[languages.en.menu.main]]
name = “About Us”
url = “/about/”
weight = 2[[languages.en.menu.main]]
name = “News”
url = “/news/”
weight = 3[Languages.pl]
title = “New Site Title Polish”
weight = 2
languageName = “Polish”[[languages.pl.menu.main]]
name = “Home”
url = “/”
weight = 1[[languages.pl.menu.main]]
name = “O nas”
url = “/about/”
weight = 2[[languages.pl.menu.main]]
name = “Aktualności”
url = “/news/”
weight = 3
I am really confused now I cannot see the mistake clearly here. Could somebody please help me to clarify the problem here?
Thanks in advance!