{{/* Language preference + browser language detection. Rendered inline in
on purpose: it must run before the page paints so a visitor is never shown a flash of the wrong language, and inlining avoids an extra HTTP request for ~1 KB of script. Hugo hands the script everything it needs, so the script never has to guess URLs: the home page of every language and the translations of *this* page. That keeps it correct even though French is served from the site root ("/") while the other languages sit under a prefix ("/en/", "/nl/"). */}} {{ if hugo.IsMultilingual }} {{ $homes := dict }} {{ range hugo.Sites }} {{ $homes = merge $homes (dict .Language.Lang .Home.RelPermalink) }} {{ end }} {{ $translations := dict }} {{ range .AllTranslations }} {{ $translations = merge $translations (dict .Lang .RelPermalink) }} {{ end }} {{ end }}