Filter out links which locale is different from the html document's

This commit is contained in:
Lena Montenot 2023-03-23 12:33:29 +01:00
parent faab3ef680
commit 3b99de4972
1 changed files with 5 additions and 0 deletions

View File

@ -47,6 +47,11 @@ export default {
anchorAttributes.target = linkTarget; anchorAttributes.target = linkTarget;
} }
if (locale !== ""
&& document.documentElement.lang
&& document.documentElement.lang !== locale
) { return ; }
headerLinks.push( headerLinks.push(
h( h(
`li.headerLink${deviceClass}${keepOnScrollClass}${localeClass}${linkClass}`, `li.headerLink${deviceClass}${keepOnScrollClass}${localeClass}${linkClass}`,