How to change the 'Name' label on term add/edit pages programmatically? In Drupal 7 this was pretty easy. But now when I try to change the term name label on the term add/edit form all I find are protected methods.

/**
 * Implements hook_form_alter().
 */
function MYMODULE_form_alter(&amp;$form, FormStateInterface $form_state, $form_id) {

  if ($form_id == 'taxonomy_MYVOCABULARY_form') {
    ksm($form['name']);
    // ?????
  }
}


This is no translation issue.
If you mean you want to change the title of the form element, then it is basically the same as it was in 7.x.

/**
 * Implements hook_form_alter().
 */
function MYMODULE_form_alter(&amp;$form, FormStateInterface $form_state, $form_id) {
  if ($form_id == 'taxonomy_MYVOCABULARY_form') {
    $form['foo']['#title'] = t('New Title');
  }
}


Adding in what 4k4 said... field widgets behave differently than general form items:

$form['name']['widget'][0]['value']['#title'] = 'New Title';