fix(docs-i18n): clarify i18n configuration for file collections (#5028)

This commit is contained in:
Chris Swithinbank 2021-02-28 13:22:26 +01:00 committed by GitHub
parent 36608f8d75
commit e9462b5c93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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