Files
payload/test/localization/collections/NoLocalizedFields/index.ts
Jessica Chowdhury 601759d967 feat: adds ability to copy data from across locales (#8203)
### What?

Adds ability to copy data from one locale to another at a document
level.

### How?

For any localized collection, you will find a new option in the document
controls called `Copy to Locale`.

This option will open a drawer, from here you can select your origin and
destination locales.

If data already exists in the destination locale, you can choose to: 
1. Overwrite this data (this will copy any empty fields in your origin
locale)
2. Not overwrite existing data (this will only copy data into empty
fields in the destination locale)

---------

Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
2024-11-26 17:06:30 -05:00

15 lines
319 B
TypeScript

import type { CollectionConfig } from 'payload'
export const noLocalizedFieldsCollectionSlug = 'no-localized-fields'
export const NoLocalizedFieldsCollection: CollectionConfig = {
slug: noLocalizedFieldsCollectionSlug,
fields: [
{
name: 'text',
type: 'text',
localized: false,
},
],
}