Use the correct language in lang attributes
Set the lang attribute in the html element to be the right language, and also add lang attributes to text in a language that is different to the page language, such as the language switcher links.
This commit is contained in:
parent
ff657d2db1
commit
9c467304ec
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="{{ .Lang }}">
|
||||
|
||||
{{ partial "head.html" . }}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="{{ .Lang }}">
|
||||
|
||||
{{ partial "head.html" . }}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="{{ .Lang }}">
|
||||
|
||||
{{ partial "head.html" . }}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="{{ .Lang }}">
|
||||
|
||||
{{ partial "head.html" . }}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="{{ .Lang }}">
|
||||
|
||||
{{ partial "head.html" . }}
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
<div class="navlinks-children">
|
||||
{{ range .Site.Languages }}
|
||||
{{ if not (eq .Lang $.Site.Language.Lang) }}
|
||||
<a href="/{{ .Lang }}">{{ default .Lang .LanguageName }}</a>
|
||||
<a href="/{{ .Lang }}" lang="{{ .Lang }}">{{ default .Lang .LanguageName }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
@ -45,7 +45,7 @@
|
||||
<li>
|
||||
{{ range .Site.Languages }}
|
||||
{{ if not (eq .Lang $.Site.Language.Lang) }}
|
||||
<a href="/{{ .Lang }}">{{ default .Lang .LanguageName }}</a>
|
||||
<a href="/{{ .Lang }}" lang="{{ .Lang }}">{{ default .Lang .LanguageName }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</li>
|
||||
|
Loading…
Reference in New Issue
Block a user