From e9462b5c93c54de9933f8d2879150713486f5a38 Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Sun, 28 Feb 2021 13:22:26 +0100 Subject: [PATCH] fix(docs-i18n): clarify i18n configuration for file collections (#5028) --- website/content/docs/beta-features.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/website/content/docs/beta-features.md b/website/content/docs/beta-features.md index aabc8bdb..9975b168 100644 --- a/website/content/docs/beta-features.md +++ b/website/content/docs/beta-features.md @@ -98,6 +98,26 @@ collections: i18n: true ``` +When using a file collection, you must also enable i18n for each individual file: + +```yaml +collections: + - name: pages + label: Pages + # Configure i18n for this collection. + i18n: + structure: single_file + locales: [en, de, fr] + files: + - name: about + label: About Page + file: site/content/about.yml + # Enable i18n for this file. + i18n: true + fields: + - { label: Title, name: title, widget: string, i18n: true } +``` + ### Field level configuration ```yaml