Change record status: 
Project: 
Introduced in branch: 
8.3.x
Introduced in version: 
8.3.0
Description: 

When the original language of an entity is changed in a form, $form_state->get('entity_default_langcode') now returns the updated language when the form is rebuilt for example after an Ajax operation.

As a corollary ContentEntityForm::isDefaultFormLangcode() can now reliably be used to determine whether the current form is a translation form or not.

Impacts: 
Module developers