add multilingual support

This commit is contained in:
geekifan
2025-04-27 16:17:45 +08:00
parent 1e0bb29742
commit 9c9f002965
18 changed files with 738 additions and 18 deletions

View 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>