docs: Multilingual documentation for frontmatter params

Fixes #2990
This commit is contained in:
Sebastian G 2017-01-27 15:15:55 +01:00 committed by digitalcraftsman
parent d2a0d9c2d3
commit e00efc0cfc

View File

@ -17,6 +17,9 @@ Example:
DefaultContentLanguage = "en" DefaultContentLanguage = "en"
copyright = "Everything is mine" copyright = "Everything is mine"
[params.navigation]
help = "Help"
[Languages] [Languages]
[Languages.en] [Languages.en]
title = "My blog" title = "My blog"
@ -30,6 +33,8 @@ title = "Mon blog"
weight = 2 weight = 2
[Languages.fr.params] [Languages.fr.params]
linkedin = "lien-francais" linkedin = "lien-francais"
[Languages.fr.navigation]
help = "Aide"
``` ```
@ -39,6 +44,8 @@ value for that key (like `copyright` for the English (`en`) language in this exa
With the config above, all content, sitemap, RSS feeds, paginations With the config above, all content, sitemap, RSS feeds, paginations
and taxonomy pages will be rendered below `/` in English (your default content language), and below `/fr` in French. and taxonomy pages will be rendered below `/` in English (your default content language), and below `/fr` in French.
When working with params in frontmatter pages, omit the `params` in the key for the translation.
If you want all of the languages to be put below their respective language code, enable `defaultContentLanguageInSubdir: true` in your configuration. If you want all of the languages to be put below their respective language code, enable `defaultContentLanguageInSubdir: true` in your configuration.
Only the obvious non-global options can be overridden per language. Examples of global options are `BaseURL`, `BuildDrafts`, etc. Only the obvious non-global options can be overridden per language. Examples of global options are `BaseURL`, `BuildDrafts`, etc.