add multilingual support
This commit is contained in:
10
layouts/partials/language-selector.html
Normal file
10
layouts/partials/language-selector.html
Normal file
@ -0,0 +1,10 @@
|
||||
<div class="language-selector">
|
||||
<select class="language-dropdown" onchange="location = this.value;">
|
||||
{{ $currentLang := .Site.Language.Lang }}
|
||||
{{ range .Site.Languages }}
|
||||
<option value="/{{ .Lang }}/" {{ if eq .Lang $currentLang }}selected{{ end }}>
|
||||
{{ .LanguageName }} ({{ .Lang }})
|
||||
</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
</div>
|
Reference in New Issue
Block a user