Problem/Motivation

It would be nice to change the language of entities by using drush commands.

Proposed resolution

Create two drush commands:


1) Command that changes the default language to a specific entity:

drush entity_change_default_language:change-default-language node 4 en


2) Command that changes the default language to all entities of a specific type:

It would only change the language, when that entity has a translation into the target language.

drush entity_change_default_language:change-default-language-entity-type node en --preserve-languages=es
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

omarlopesino created an issue. See original summary.

omarlopesino’s picture

Status: Active » Needs review

I've created a MR with the functionality, please check!

facine made their first commit to this issue’s fork.

facine’s picture

Status: Needs review » Fixed

Thanks, I have applied some changes, as readonly is available in PHP >= 8.1.

Merged!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.