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.
This module provides a service for changing the default language of an entity.
No user interface for now, only a helper module for developers.
/** @var \Drupal\entity_change_default_language\EntityChangeDefaultLanguageInterface $default_language_fixer */
$default_language_fixer = \Drupal::service('entity_change_default_language');
$default_language_fixer->update(\Drupal\node\Entity\Node::load(1), 'es', TRUE, ['en']);
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.