Skip to content

User interface

Translatable content of an enabled entity type gets a Change default language operation. It opens a confirmation form with the same options as the ecdl:cdl Drush command.

The operation is restricted. Grant the permission Change the default language of content entities to the roles that may use it. The user also needs update access to the entity. The settings have their own permission, Administer Entity Change Default Language.

The two permissions of the module on the permissions page

The operation shows in the operations menu of the content list. The demo site has an English article, Travel tips, with Spanish and French translations, tagged Travel.

The operations menu of the Travel tips article with the Change default language operation

Here Spanish becomes the default language of Travel tips, and its Tags field is followed, so the Travel term changes too.

The confirmation form with Spanish as the new default language and the Tags field followed

Option Meaning
New default language The languages the content is translated to come first. The other site languages show as (not translated yet).
Create the missing translation Off by default. Creates the new default translation from the current default values when the content has none. A language that is not translated yet needs it.
Translations to keep Every translation is checked. The unchecked ones are deleted. The new default language is always kept.
Keep the old default language as a translation On by default. Unchecked, the values in the old default language are deleted.
Also follow these reference fields The content these fields reference changes its default language too, with the same options. Only fields that target an enabled entity type are offered. Paragraphs and other composites always follow their host.

The status message that the default language has been changed

Spanish is now the original language of Travel tips, and English and French are translations. If the change fails, nothing is stored and the form shows an error.

The Travel term changed with the article, through the Tags field. Spanish is its original language now.

The translations table of the Travel term with Spanish as the original language

Hidden gems is an English article with no other translation. It has the operation too. Pick a language that is not translated yet, here French, and check Create the missing translation.

The confirmation form of Hidden gems with French, not translated yet, and Create the missing translation checked

The translations table of Hidden gems with French as the original language and English as a translation

The French translation was created from the English values and is the original now. English stays as a translation, since Keep the old default language as a translation was checked.

  • Users with the permission and update access to the entity.
  • Content of an entity type that is translatable, has an edit form and is enabled in the settings.
  • The route adds /change-default-language to the canonical path of the entity, for example /node/2/change-default-language, or to its edit form path when it has no canonical one.