mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2025-05-12 23:37:47 +02:00
Use i18n to translate some strings
Hugo 0.17 allows for easy multi-lingual sites. Strings can be translated either in the theme or in the site, and missing strings will fall back to the default language. See: https://github.com/spf13/hugo/blob/master/docs/content/content/multilingual.md
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
{{ .Content }}
|
||||
|
||||
{{ if .IsTranslated }}
|
||||
<h4>Translations</h4>
|
||||
<h4>{{ i18n "translations" }}</h4>
|
||||
<ul>
|
||||
{{ range .Translations }}
|
||||
<li>
|
||||
|
@ -4,5 +4,5 @@
|
||||
<p class="blog-post-meta"><time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format .Site.Params.date_format }}</time> by {{ .Params.author | default .Site.Params.author }}{{ if or (.Params.categories) (.Params.tags) }} in {{ partial "meta-terms.html" . }}{{ end }}</p>
|
||||
</header>
|
||||
{{ .Summary }}
|
||||
<a href='{{ .Permalink }}'>Read more →</a>
|
||||
<a href='{{ .Permalink }}'>{{ i18n "readMore" }} →</a>
|
||||
</article> <!-- /.blog-post -->
|
||||
|
Reference in New Issue
Block a user