function locale_translation_language_table

Same name and namespace in other branches
  1. 10 core/modules/locale/locale.module \locale_translation_language_table()
  2. 11.x core/modules/locale/locale.module \locale_translation_language_table()
  3. 9 core/modules/locale/locale.module \locale_translation_language_table()
  4. 8.9.x core/modules/locale/locale.module \locale_translation_language_table()

Form element callback: After build changes to the language update table.

Adds labels to the languages and removes checkboxes from languages from which translation files could not be found.

Deprecated

in drupal:11.5.0 and is removed from drupal:13.0.0. There is no replacement.

See also

https://www.drupal.org/node/3616293

File

core/modules/locale/locale.module, line 748

Code

function locale_translation_language_table($form_element) {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.5.0 and is removed from drupal:13.0.0. There is no replacement. See https://www.drupal.org/node/3616293', E_USER_DEPRECATED);
  // Remove checkboxes of languages without updates.
  if ($form_element['#not_found']) {
    foreach ($form_element['#not_found'] as $langcode) {
      $form_element[$langcode] = [];
    }
  }
  return $form_element;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.