From e9193c9bc9be27cf468e8893f283a05779ad57e5 Mon Sep 17 00:00:00 2001 From: Francesco Maida Date: Sat, 18 Apr 2020 18:25:41 +0200 Subject: [PATCH] multi-language support through i18n --- i18n/en.toml | 17 +++++++++++++++++ i18n/it.toml | 17 +++++++++++++++++ layouts/index.html | 8 ++++---- layouts/partials/footer.html | 6 +++--- 4 files changed, 41 insertions(+), 7 deletions(-) create mode 100644 i18n/en.toml create mode 100644 i18n/it.toml diff --git a/i18n/en.toml b/i18n/en.toml new file mode 100644 index 0000000..d2721a6 --- /dev/null +++ b/i18n/en.toml @@ -0,0 +1,17 @@ +[page] +other = "Page" + +[of] +other = "of" + +[newer] +other = "Newer" + +[older] +other = "Older" + +[noteworthy_theme] +other = "Noteworthy theme" + +[built_with_hugo] +other = "Built with Hugo" diff --git a/i18n/it.toml b/i18n/it.toml new file mode 100644 index 0000000..81f2cb5 --- /dev/null +++ b/i18n/it.toml @@ -0,0 +1,17 @@ +[page] +other = "Pagina" + +[of] +other = "di" + +[newer] +other = "Successivi" + +[older] +other = "Precedenti" + +[noteworthy_theme] +other = "Tema Noteworthy" + +[built_with_hugo] +other = "Realizzato con Hugo" diff --git a/layouts/index.html b/layouts/index.html index 426a164..91806f7 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -38,7 +38,7 @@
{{ $paginator := .Paginator }} {{ if gt .Paginator.TotalPages 1 }} -

Page {{ $paginator.PageNumber}} of {{ $paginator.TotalPages }}

+

{{ i18n "page" }} {{ $paginator.PageNumber}} {{ i18n "of" }} {{ $paginator.TotalPages }}