Open expersso opened 8 months ago
Hello, I also use this and love this theme and I am also wondering about this topic. what I did was I added a language link at the header.yaml and whenever someone wants to change the language It goes back to the homepage of that language. This way it would be much more accessible but I guess much more mapping-crosslinking is needed 🫨
I love the theme, it's beautiful, great work!
However, as someone who does not often deal with Hugo and the likes, I am having a hard time to get a simple language switcher in the header menu to work. I like how Hugoplate does it, but I can't manage to port that solution over easily.
What's the best practice to allow the user to switch languages on site?
I'm interested too.
thanks
Although it is not too hard to fix this I am wondering: you expect somebody to land on a specific page in the wrong language? I mean... isn't that 90% from Google and therefore in the right language? Anyway... it is perfectly possible to implement this, BUT you need a proper administration of all alternative URL's. It is not easy to maintain, as the current language switcher is a piece of cake.
I will leave this open as I might fix this later.
Loving this theme!
I'm trying to add i18n support, but I'm wondering about the best practice for url management. For example, let's say I implement a language switcher in the navbar like this:
This works, but it sends the user to the landing page, whereas I would prefer for it to link to e.g. /nl/about if you click on it while on the about page.
More importantly, I wonder about how to deal with the navbar links defined in
data/en/header.yaml
. Do I need to change the urls on all these manually for alternative languages, e.g.Or is there already support for automating this?
Lastly, could one add sitemap functionality that treats the main language as the canonical reference and lists alternative languages?