diff --git a/core/modules/block/custom_block/config/custom_block.type.basic.yml b/core/modules/block/custom_block/config/custom_block.type.basic.yml index 1b0e2f8..58e87d7 100644 --- a/core/modules/block/custom_block/config/custom_block.type.basic.yml +++ b/core/modules/block/custom_block/config/custom_block.type.basic.yml @@ -2,3 +2,4 @@ id: basic label: Basic block revision: '0' description: A basic block contains a title and a body. +langcode: en diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeFormController.php b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeFormController.php index 77664e9..db90ff0 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeFormController.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeFormController.php @@ -37,6 +37,10 @@ public function form(array $form, array &$form_state, EntityInterface $block_typ ), '#disabled' => !$block_type->isNew(), ); + $form['langcode'] = array( + '#type' => 'value', + '#value' => !$block_type->isNew() ? $block_type->langcode : language_default()->langcode, + ); $form['description'] = array( '#type' => 'textarea', diff --git a/core/modules/block/lib/Drupal/block/BlockBase.php b/core/modules/block/lib/Drupal/block/BlockBase.php index d32444f..2f4d2e9 100644 --- a/core/modules/block/lib/Drupal/block/BlockBase.php +++ b/core/modules/block/lib/Drupal/block/BlockBase.php @@ -252,6 +252,10 @@ public function form($form, &$form_state) { '#required' => TRUE, '#disabled' => !$entity->isNew(), ); + $form['langcode'] = array( + '#type' => 'value', + '#value' => !$entity->isNew() ? $entity->langcode : language_default()->langcode, + ); // Region settings. $form['region'] = array( diff --git a/core/modules/contact/config/contact.category.feedback.yml b/core/modules/contact/config/contact.category.feedback.yml index 8aff8c6..aae9098 100644 --- a/core/modules/contact/config/contact.category.feedback.yml +++ b/core/modules/contact/config/contact.category.feedback.yml @@ -3,3 +3,4 @@ label: 'Website feedback' recipients: [] reply: '' weight: '0' +langcode: en diff --git a/core/modules/contact/lib/Drupal/contact/CategoryFormController.php b/core/modules/contact/lib/Drupal/contact/CategoryFormController.php index d60308f..4b301e8 100644 --- a/core/modules/contact/lib/Drupal/contact/CategoryFormController.php +++ b/core/modules/contact/lib/Drupal/contact/CategoryFormController.php @@ -39,6 +39,10 @@ public function form(array $form, array &$form_state, EntityInterface $category) ), '#disabled' => !$category->isNew(), ); + $form['langcode'] = array( + '#type' => 'value', + '#value' => !$category->isNew() ? $category->langcode : language_default()->langcode, + ); $form['recipients'] = array( '#type' => 'textarea', '#title' => t('Recipients'), diff --git a/core/modules/filter/filter.admin.inc b/core/modules/filter/filter.admin.inc index 806c1d7..12fc730 100644 --- a/core/modules/filter/filter.admin.inc +++ b/core/modules/filter/filter.admin.inc @@ -169,6 +169,10 @@ function filter_admin_format_form($form, &$form_state, $format) { '#disabled' => !empty($format->format), '#weight' => -20, ); + $form['langcode'] = array( + '#type' => 'value', + '#value' => !$format->isNew() ? $format->langcode : language_default()->langcode, + ); // Add user role access selection. $form['roles'] = array( diff --git a/core/modules/user/config/user.role.anonymous.yml b/core/modules/user/config/user.role.anonymous.yml index 11defb0..1947f35 100644 --- a/core/modules/user/config/user.role.anonymous.yml +++ b/core/modules/user/config/user.role.anonymous.yml @@ -1,3 +1,4 @@ id: anonymous label: Anonymous user weight: 0 +langcode: en diff --git a/core/modules/user/config/user.role.authenticated.yml b/core/modules/user/config/user.role.authenticated.yml index dc4b65d..16df96d 100644 --- a/core/modules/user/config/user.role.authenticated.yml +++ b/core/modules/user/config/user.role.authenticated.yml @@ -1,3 +1,4 @@ id: authenticated label: Authenticated user weight: 1 +langcode: en diff --git a/core/modules/user/user.admin.inc b/core/modules/user/user.admin.inc index c3931d8..1b1e792 100644 --- a/core/modules/user/user.admin.inc +++ b/core/modules/user/user.admin.inc @@ -1004,6 +1004,10 @@ function user_admin_role($form, $form_state, $role) { 'source' => array('role', 'label'), ), ); + $form['role']['langcode'] = array( + '#type' => 'value', + '#value' => !$role->isNew() ? $role->langcode : language_default()->langcode, + ); $form['role']['weight'] = array( '#type' => 'value', '#value' => $role->weight,