I’m using hugo to create a multilingual site but I have a small problem I don’t know how to solve. I want to include a “Contact me” button on the site and it should link to the respective contact form. This is how I structured my content:
I now want to link to $baseURL/kontakt on the german version and $baseURL/contact on the english version. How can I achieve this with .Site.GetPage given the current content structure?
The different paths are for more manageable translations (instead of having lots of files next to each other and setting all required things in front matter I directly put them into translated directories which will help me find the files) so keeping it will be a bonus. I’ve read about translationKey earlier but I wasn’t sure if it was what I wanted so I will give it a try.
It’s important to leave the _global key in otherwise the partial can’t access the global scope and thus can’t find the file. The partial also only works for regular pages, not sections and anything else.
I’ll consider opening an issue on github for this later