From ce2d487288b399ebd2417c105a8faabec8c68ad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sun, 3 Dec 2017 14:33:21 +0100 Subject: [PATCH] Add docs for .AllTranslations --- content/content-management/multilingual.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/content/content-management/multilingual.md b/content/content-management/multilingual.md index 420c6d676..94ecd9d71 100644 --- a/content/content-management/multilingual.md +++ b/content/content-management/multilingual.md @@ -192,6 +192,19 @@ The above can be put in a `partial` (i.e., inside `layouts/partials/`) and inclu The above also uses the [`i18n` function][i18func] described in the next section. +## List All Available Languages + +`.AllTranslations` on a `Page` can be used to list all translation including itself. Called on the home page it can be used to build a language navigator: + + +{{< code file="layouts/partials/allLanguages.html" >}} + +{{< /code >}} + ## Translation of Strings Hugo uses [go-i18n][] to support string translations. [See the project's source repository][go-i18n-source] to find tools that will help you manage your translation workflows.