feat: i18n support (#387)
This commit is contained in:
committed by
GitHub
parent
7372c3735b
commit
a01f30ef69
@ -7,6 +7,19 @@ local_backend: true
|
||||
|
||||
media_folder: /packages/core/dev-test/backends/proxy/assets/upload
|
||||
public_folder: /backends/proxy/assets/upload
|
||||
i18n:
|
||||
# Required and can be one of multiple_folders, multiple_files or single_file
|
||||
# multiple_folders - persists files in `<folder>/<locale>/<slug>.<extension>`
|
||||
# multiple_files - persists files in `<folder>/<slug>.<locale>.<extension>`
|
||||
# single_file - persists a single file in `<folder>/<slug>.<extension>`
|
||||
structure: multiple_files
|
||||
|
||||
# Required - a list of locales to show in the editor UI
|
||||
locales: [en, de, fr]
|
||||
|
||||
# Optional, defaults to the first item in locales.
|
||||
# The locale to be used for fields validation and as a baseline for the entry.
|
||||
defaultLocale: en
|
||||
collections:
|
||||
- name: posts
|
||||
label: Posts
|
||||
@ -469,3 +482,24 @@ collections:
|
||||
- label: File
|
||||
name: file
|
||||
widget: file
|
||||
- name: i18n_playground
|
||||
label: i18n Playground
|
||||
i18n: true
|
||||
folder: packages/core/dev-test/backends/proxy/_i18n_playground
|
||||
identifier_field: slug
|
||||
create: true
|
||||
fields:
|
||||
# The slug field will be omitted from the translation.
|
||||
- name: slug
|
||||
label: Slug
|
||||
widget: string
|
||||
# same as 'i18n: translate'. Allows translation of the description field
|
||||
- name: description
|
||||
label: Description
|
||||
widget: text
|
||||
i18n: true
|
||||
# The date field will be duplicated from the default locale.
|
||||
- name: date
|
||||
label: Date
|
||||
widget: datetime
|
||||
i18n: duplicate
|
||||
|
Reference in New Issue
Block a user