Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Entity Change Default Language

Security covered Under active development 494 sites

Part of the Entity ecosystem · 308 projects

This module provides a developer tool to programmatically change the default language of an entity. It offers a service that allows developers to update an entity's default language, with options to decide whether to update translations and specify which languages to target.

Entity Change Default Language changes the default (original) language of translatable content, for example a node created in English that should be Spanish. The translation in the new language becomes the original one, and the old default language can stay as a translation.

Key features

  • A "Change default language" operation on content, with a confirmation form.
  • Works on every translatable content entity type: nodes, taxonomy terms, blocks, users and more.
  • Creates the new default translation when it is missing, so content with a single translation can be changed too.
  • Chooses which translations to keep and whether the old default language stays.
  • Paragraphs follow their host, and other reference fields follow on request.
  • The whole change runs in one database transaction, rolled back on failure.
  • Drush commands for one entity or a whole entity type, through a queue.

How it works

  • User interface: users with the "Change the default language of content entities" permission, who may also edit the content, get a "Change default language" operation.
  • Settings: at Configuration > Regional and language > Entity Change Default Language, exclude some entity types or allow only some. By default every translatable content entity type is enabled.
  • Drush: drush ecdl:cdl node 1 es changes one entity now, and drush ecdl:dlet node es queues every entity of a type.
  • Service: code calls \Drupal::service('entity_change_default_language')->update($entity, 'es').
  • Queue: cron processes the queued items, tries a failed one up to 5 times in all and logs every skipped one.

Requirements

  • Drupal 11.4 or later, or Drupal 12, and PHP 8.3 or later.
  • Language and Content Translation, both in core.
  • Drush 13 or later, only for the Drush commands.

Sites on Drupal 9, 10 or 11.0 to 11.3 can use the 1.0.x branch.

Documentation

Read the user documentation, with screenshots of every step, and the README.

Looking for Drupal support?

Premium support from the project maintainers
Get in touch with us
Drupal 11 · not 10 PHP >=8.3

Ask your assistant about Entity Change Default Language

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • content_translation Drupal core
  • language Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
7
Tracked since
Nov 2023
Latest release
1 week ago
Releases (12 mo)
2 ▼ from 3
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.1.0 Stable 11 PHP >=8.3 Oct 5, 2026
1.0.4 Stable 9–11 PHP ^8.0 Oct 4, 2026
1.0.3 Stable 9–11 Jun 3, 2025
1.0.2 Stable 9–10 Mar 8, 2025
1.0.1 Stable 9–10 Nov 19, 2024
1.0.0 Stable 9–10 PHP ^8.0 Nov 24, 2023
1.x-dev Dev 11 PHP >=8.3 Nov 24, 2023