diff --git a/exampleSite/config.toml b/exampleSite/config.toml index e2ea524..c047d85 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -4,6 +4,7 @@ theme = "hugo-theme-stack" paginate = 5 title = "Example Site" disqusShortname = "hugo-theme-stack" # Change it to your Disqus shortname before using +DefaultContentLanguage = "en" # Theme i18n support [permalinks] post = "/p/:slug/" diff --git a/i18n/en.toml b/i18n/en.toml new file mode 100644 index 0000000..dd89621 --- /dev/null +++ b/i18n/en.toml @@ -0,0 +1,23 @@ +[toggleMenu] + other = "Toggle Menu" + +[relatedContents] + other = "Related contents" + +[lastUpdatedOn] + other ="Last updated on " + +[widgetArchiveTitle] + other = "Archive" + +[widgetArchiveMore] + other = "More" + +[widgetTagCloudTitle] + other = "Tags" + +[notFoundTitle] + other = "Not Found" + +[notFoundSubtitle] + other = "This page does not exist." \ No newline at end of file diff --git a/layouts/404.html b/layouts/404.html index 2d4565a..d882c30 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -5,8 +5,8 @@
-

Not Found

-

This page does not exist.

+

{{ T "notFoundTitle" }}

+

{{ T "notFoundSubtitle" }}

diff --git a/layouts/partials/article/components/footer.html b/layouts/partials/article/components/footer.html index 3b281bc..c6f80e5 100644 --- a/layouts/partials/article/components/footer.html +++ b/layouts/partials/article/components/footer.html @@ -17,7 +17,9 @@ {{- if ne .Lastmod .Date -}}
{{ (resources.Get "icons/clock.svg").Content | safeHTML }} - Last updated on {{ .Lastmod.Format ( or .Site.Params.dateFormat "Jan 02, 2006 15:04 MST" ) }} + + {{ T "lastUpdatedOn" }} {{ .Lastmod.Format ( or .Site.Params.dateFormat "Jan 02, 2006 15:04 MST" ) }} +
{{- end -}} \ No newline at end of file diff --git a/layouts/partials/article/components/related-contents.html b/layouts/partials/article/components/related-contents.html index ac85adf..2f3b52c 100644 --- a/layouts/partials/article/components/related-contents.html +++ b/layouts/partials/article/components/related-contents.html @@ -1,7 +1,7 @@