node_change_default_language
A Drupal module that allows changing the default/source language of nodes via UI using direct SQL queries.
Similar modules
There is a similar module called entity_change_default_language, but its logic is different. This module only works with nodes and ensures consistency of content in fields and referenced entities.
Features
- UI Integration: Adds "Change default language" option to node operations dropdown in admin content lists
- Standalone Form: Provides a dedicated form at `/node/{nid}/change-default-language`
- Revision Tracking: Creates a new revision with log message "Default language was changed from X to Y"
- Content Moderation Compatible: Works with Drupal's content moderation without causing validation errors
- Non-translatable Field Handling: Properly handles non-translatable fields by copying/cloning values
The module uses direct SQL queries via Drupal's Database API to change the `default_langcode` flag.
Non-Translatable Field Handling
Non-translatable fields (fields configured with "Users may translate this field" unchecked) only exist on the default translation. When changing the default language, these field values must be transferred.
The module:
Copies simple non-translatable field values to the new default translation
IMPORTANT: You need a Drupal core patch https://www.drupal.org/files/issues/2025-06-26/core-translation-already-...
Drupal core issue: https://www.drupal.org/project/drupal/issues/3208030