Language autoselection

Hi there.

I am currently planning to move http://www.repaircafeaarhus.dk to hugo (on european hosting + https, and big changes in design).

Provided that the website would be in two languages, with each section also translated accordingly, would it be possible the user lands on the page of language (s)he likes the most ?

What would be the needs (yes, multilang theme, but what else ?) … ?

JavaScript

& Some Time

Can you give more insights ? What you suggest ?

I am not a javascript specialist, so I don’t know much in this world…

If you configure hreflang correctly then the correct language version will be listed in the search engines in the correct countries.

So a German reader, would search the German Google, and get the German version if you have configured a German translated page and marked it up correctly.

Likewise, you can set a fall back (x-default or something (you will have to look it up)) so if not specifically configured, Search engines will say display the English version.

This is something you will need to look into yourself, and perhaps checkout some of the Hugo themes that have implemented it already to give you direction on how to configure it all.

Maybe this can help: https://help.localizejs.com/docs/detecting-language-of-a-visitor

@sjardim Can you please take down your Hugo docs site. Seems to add some confusion and it came up in a separate Slack channel chat. Thank you, sir!

Sorry about that, @rdwatters!
Done, I deleted the site.

1 Like