Updates remote languages mappings.
array $form: An associative array containing the initial structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the complete form.
public static function updateRemoteLanguagesMappings(array $form, FormStateInterface $form_state) {
if (!empty($form_state
->getUserInput()['remote_languages_mappings'])) {
// The user input containing remote languages mappings from an old
// translator, so We have to remove them from here.
$user_input = $form_state
->getUserInput();
unset($user_input['remote_languages_mappings']);
$form_state
->setUserInput($user_input);
}
$form_state
->setRebuild();
}