From 4adf4bb9440a341648f5822791258bab96f5460a Mon Sep 17 00:00:00 2001 From: southerntofu Date: Mon, 30 Mar 2020 12:53:45 +0200 Subject: [PATCH] Document i18n for menu macro --- templates/widgets.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/templates/widgets.html b/templates/widgets.html index adedb85..a91e0ba 100644 --- a/templates/widgets.html +++ b/templates/widgets.html @@ -6,6 +6,12 @@ Provide the widget with a content page {{ widgets::menu(content="_common/menus/main.md") }} +If the content page has a translation, it will be +automatically loaded in the current language, as long as +your parent template has a `lang` variable set, like so: + +{% set lang = section.lang | default(value=page.lang) %} + Separate entries with a thematic break: either ---, ~~~, ___ or