Closed xlsigned closed 2 weeks ago
Closing as duplicate of https://github.com/gohugoio/hugo/issues/7844.
Please open an issue in the documentation repository regarding suggested changes to the documentation.
Closing as duplicate of #7844.
Well, I see you tried to create a PR to enable cross-site-language translations some time ago ...
Please open an issue in the documentation repository regarding suggested changes to the documentation.
When I use
{{ i18n "key" }}
in a template, there appears to be no way to change/set the target language. E. g. if$page
is a translated page (from$.AllTranslations
), neithernor
has any effect on the target language, while
{{ $page.Content }}
clearly shows that I have indeed looked up a translated page.The documentation should state how (or rather when) the language is determined and what the optional parameter
[CONTEXT]
actually means and if it is at all possible to change the target language within a template.The scenario is a Multilingual Site where I want language specific pages that are still incomplete to show the content of the default language (or any other language).
For this I'm using a custom frontmatter value in the incomplete page which triggers the fallback when set, i. e. the template looks up the already completed/translated (default) $page and calls
{{ $page.Content }}
instead of{{ .Content }}
.