Linking in multilingual mode with localized permalinks

I’m setting up a multilingual website right now. There are two languages: English and German. Now I want to localize my permalinks. For example: /about/ in EN should be /de/ueber-mich/ in DE. In the documentation I read the following:

To localize URLs:

  • For a regular page, set either slug or url in front matter
  • For a section page, set url in front matter


So I added slug: ueber-mich to my /de/ file. Inside my theme I used {{ "about" | relLangURL }} then to link to the correct page. For the english version it is working correctly (of course). In the german version the link goes to β€œ/de/about/” and when I click it, it’s a 404.

My expectation was that Hugo will set the link to /de/ueber-mich/. Can someone tells me how to solve that problem?

You can have 2 different URL and totally different pages. You then connect them by specifying unique translationKey in front matter. This will connect both sides across two languages.

translationKey: about

1 Like

Thanks @idarek! Problem solved.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.