Initial translation support for text strings like headers and sentences
This commit is contained in:
parent
7500d67c4a
commit
fde1ab5b32
3 changed files with 27 additions and 3 deletions
6
themes/nluug/i18n/en.yaml
Normal file
6
themes/nluug/i18n/en.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
- id: header_latest_news
|
||||
translation: "Latest news"
|
||||
- id: header_upcoming_events
|
||||
translation: "Upcoming events"
|
||||
- id: sentence_more_events_planned
|
||||
translation: "Besides these events by us, there are additional events planned in the near future"
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
{{ if gt (len (where .Site.RegularPages "Section" "nieuws")) 0 }}
|
||||
<section>
|
||||
<h2>Laatste nieuws</h2>
|
||||
<h2>{{ i18n "header_latest_news" | default "Laatste nieuws" }}</h2>
|
||||
<ul class="list">
|
||||
{{ range (first 5 (where .Site.RegularPages "Section" "nieuws").ByDate.Reverse) }}
|
||||
<li>
|
||||
|
@ -20,7 +20,7 @@
|
|||
<section>
|
||||
{{ $upcoming_events := sort .Site.Data.evenementen.kalender "date_start" "asc" }}
|
||||
|
||||
<h2>Aankomende evenementen</h2>
|
||||
<h2>{{ i18n "header_upcoming_events" | default "Aankomende evenementen" }}</h2>
|
||||
<div class="three-column-grid">
|
||||
{{ range $upcoming_events }}
|
||||
{{ $date_start := .date_start | time.Format "2006-01-02" }}
|
||||
|
@ -45,7 +45,7 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<p>Naast de door ons georganiseerde evenementen staat er meer op de agenda.</p>
|
||||
<p>{{ i18n "sentence_more_events_planned" | default "Naast de door ons georganiseerde evenementen staat er meer op de agenda" }}.</p>
|
||||
<ul>
|
||||
{{ range first 10 (where $upcoming_events "date_start" "ge" (dateFormat "2006-01-02" now)) }}
|
||||
<li><time class="time" datetime="{{ .date_start | dateFormat "2006-01-02" }}">{{ .date_start | dateFormat "02-01-2006" }}</time> - <a href="/evenementen/kalender/#{{ anchorize (.date_start | dateFormat "2006-01-02") }}-{{ anchorize .name }}">{{ .name }}</a></li>
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<script type="application/ld+json">
|
||||
{
|
||||
"@context":"https://schema.org",
|
||||
"@type":"ItemList",
|
||||
"mainEntityOfPage":{
|
||||
"@type":"CollectionPage",
|
||||
"@id":"https://example.com/"
|
||||
},
|
||||
"itemListElement": [
|
||||
"@type": "ListItem",
|
||||
"position": "1",
|
||||
"item": {
|
||||
"@type": "Person",
|
||||
"url": "http://example.com/big_list_of_recipes#strawberry-mango-pie",
|
||||
"name": "Naam",
|
||||
"image": "{{ .thumbnail }}",
|
||||
}
|
||||
]
|
Loading…
Reference in a new issue