Submit handler to update the bundle for the default language configuration.
public function languageConfigurationSubmit(array &$form, array &$form_state) {
$vocabulary = $this
->getEntity($form_state);
// Delete the old language settings for the vocabulary, if the machine name
// is changed.
if ($vocabulary && isset($vocabulary->machine_name) && $vocabulary->machine_name != $form_state['values']['machine_name']) {
language_clear_default_configuration('taxonomy_term', $vocabulary->machine_name);
}
// Since the machine name is not known yet, and it can be changed anytime,
// we have to also update the bundle property for the default language
// configuration in order to have the correct bundle value.
$form_state['language']['default_language']['bundle'] = $form_state['values']['machine_name'];
}