Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jakewies/hugo-theme-codex.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbnis <5955614+rbnis@users.noreply.github.com>2021-01-05 00:55:23 +0300
committerrbnis <5955614+rbnis@users.noreply.github.com>2021-01-05 00:55:23 +0300
commit2970469e337e1b834a59edeab32ede3a02f2883c (patch)
treedc72f7df7247bb8274d3c963f829239d41e89bff
parentda2d16a4f95fc37e71548dfc139d51e22ebb09bd (diff)
feat(i18n): Add support for i18n
Initial supported languages are english and german
-rw-r--r--i18n/de.toml5
-rw-r--r--i18n/en.toml5
-rw-r--r--layouts/partials/post-pagination.html4
3 files changed, 12 insertions, 2 deletions
diff --git a/i18n/de.toml b/i18n/de.toml
new file mode 100644
index 0000000..56fa0af
--- /dev/null
+++ b/i18n/de.toml
@@ -0,0 +1,5 @@
+[prev_post]
+other = "Vorheriger Beitrag"
+
+[next_post]
+other = "Nächster Beitrag" \ No newline at end of file
diff --git a/i18n/en.toml b/i18n/en.toml
new file mode 100644
index 0000000..2e4708a
--- /dev/null
+++ b/i18n/en.toml
@@ -0,0 +1,5 @@
+[prev_post]
+other = "Previous Post"
+
+[next_post]
+other = "Next Post" \ No newline at end of file
diff --git a/layouts/partials/post-pagination.html b/layouts/partials/post-pagination.html
index 792a5f8..5b44c55 100644
--- a/layouts/partials/post-pagination.html
+++ b/layouts/partials/post-pagination.html
@@ -1,14 +1,14 @@
<div class="pagination">
{{if .PrevInSection}}
<a class="pagination__item" href="{{.PrevInSection.Permalink}}">
- <span class="pagination__label">Previous Post</span>
+ <span class="pagination__label">{{ i18n "prev_post" }}</span>
<span class="pagination__title">{{.PrevInSection.Title}}</span>
</a>
{{end}}
{{if .NextInSection}}
<a class="pagination__item" href="{{.NextInSection.Permalink}}">
- <span class="pagination__label">Next Post</span>
+ <span class="pagination__label">{{ i18n "next_post" }}</span>
<span class="pagination__title" >{{.NextInSection.Title}}</span>
</a>
{{end}}