datocms-plugin-locale-duplicate
v0.9.0
Published
Duplicate the content from one locale to another
Readme
Locale Duplicate
A DatoCMS plugin that provides two powerful features for managing multilingual content:
- Mass Locale Duplication - Bulk copy all content from one locale to another
- Field-Level Copying - Copy individual field values between locales while editing records
This can be useful when you need to:
- Migrate content from an old locale code to a new one (and optionally remove the old locale afterward).
- Duplicate content between two similar locales (e.g.,
en-USanden-UK) as a starting point before making minor adjustments. - Selectively copy specific field values between locales during content editing.
Features
Mass Locale Duplication
- One-click duplication of all fields from a source locale to a target locale.
- Selective duplication of specific content models.
- Overwrites all fields in the target locale with the content from the source locale.
- Detailed operation console showing progress and record IDs.
Field-Level Copy
- Copy buttons on individual fields in the record editor.
- Configure which fields should have copy functionality.
- Supports string, text, structured text, JSON, SEO, and slug field types.
- Copy field values between any configured locales while editing records.
Configuration
Mass Locale Duplication
No special configuration required. Access via Settings → Locale Duplicate.
Field-Level Copy Feature
- Open the plugin configuration screen.
- Select which models and fields should have copy buttons.
- Save your configuration.
- Copy buttons will appear on configured fields when editing records.
Usage
Mass Locale Duplication
- Navigate to Settings → Locale Duplicate in your DatoCMS project.
- Choose the source locale (the locale that has the content you want to duplicate).
- Choose the target locale (the locale that will receive the copied content).
- Select which models you want to duplicate:
- By default, all models are selected
- Uncheck any models you don't want to include in the duplication process
- This allows for targeted updates of specific content types
- Click Duplicate locale content.
- You will be prompted with two confirmation steps:
- Confirm that you truly want to duplicate the content.
- Confirm that you understand the existing target locale content will be overwritten.
- Watch the progress in the Operation Console. Once finished, you'll see a summary of the duplication process with details on successful and failed records.
Field-Level Copy
- Configure fields in the plugin configuration:
- Open the Locale Duplicate plugin configuration
- Select models and fields that should have copy functionality
- Save your configuration
- When editing records:
- Look for the copy button on configured fields
- Click the button to open the locale selection
- Click "Copy" to transfer the field value
Common Use Cases
Passing single field values across locales when editing a record:
- Open a record in the record editor
- Look for the copy button on configured fields
- Click "Copy" to transfer the field value
Renaming a Locale
- Create a new locale in Settings → Locales (e.g., rename
en-OLDtoen-NEW). - In the Locale Duplicate plugin, choose
en-OLDas the source anden-NEWas the target. - Duplicate the content.
- Remove the old locale (
en-OLD) from Settings → Locales if desired.
Setting Up a Similar Locale
If you have a locale like en-US and want a similar locale like en-UK:
- Create
en-UKin Settings → Locales. - In the plugin, select
en-USas the source anden-UKas the target. - Duplicate the content.
Updating Specific Content Types
If you've made major updates to certain models in one locale and want to propagate only those changes:
- Select your source and target locales.
- Uncheck all models except the ones you specifically want to update.
- Duplicate only the selected content models.
