I am trying to use breadcrumbs with multilingual support. Here is my setup:
export const Breadcrumbs: Field = {
name: 'breadcrumbs',
label: 'Breadcrumbs',
type: 'array',
fields: [
{
name: 'page',
label: 'Page',
type: 'relationship',
relationTo: 'pages',
maxDepth: 0,
admin: {
disabled: true
}
},
{
type: 'row',
fields: [
{
name: 'url',
label: 'URL',
type: 'text',
localized: true,
admin: {
width: '50%'
}
},
{
name: 'label',
label: 'Label',
type: 'text',
localized: true,
admin: {
width: '50%'
}
}
]
}
],
admin: {
disabled: false
}
};
localization: {
locales: ['en', 'tr'],
defaultLocale: 'tr',
fallback: true
},
i18n: {
debug: false,
supportedLngs: ['en', 'tr'],
fallbackLng: 'tr'
},
nestedDocs({
collections: [Post.slug, EnBlog.slug, TrBlog.slug, Page.slug],
parentFieldSlug: 'parent',
breadcrumbsFieldSlug: 'breadcrumbs',
generateLabel: (_, page) => (page.name as string) || '',
generateURL: (pages) =>
pages.reduce((url, page) => `${url}/${page.slug}`, '')
})
ONLY THE LATEST ONE IS SAVED when I try to generate breadcrumbs automatically with both languages. It is not working as expected.
I am trying to use breadcrumbs with multilingual support. Here is my setup:
ONLY THE LATEST ONE IS SAVED when I try to generate breadcrumbs automatically with both languages. It is not working as expected.