{{ $path := .Get "path" }}
{{ $currentLang := .Page.Lang }}
{{ $sites := .Page.Sites }}
{{ if ne $currentLang (index .Page.Sites 0).Language.Lang }}
{{ $sites = collections.Reverse .Page.Sites }}
{{ end }}
{{ range $sites }}
{{ with .GetPage $path }}
{{ .Title }}
{{ if and (eq $currentLang "en") (eq .Lang "fr") }}
{{- partial "icons/fr.svg" . -}}
{{ end }}
{{ if (eq $currentLang "fr") }}
{{- partial "lang-detection.html" . -}}
{{ if .Scratch.Get "en_article_in_fr_site" }}
{{- partial "icons/en.svg" . -}}
{{ end }}
{{ end }}
{{ break }}
{{ end }}
{{ end }}