function 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.

1 string reference to 'locale_translation_language_table'
locale_translation_status_form in drupal/core/modules/locale/locale.pages.inc
Page callback: Display the current translation status.

File

drupal/core/modules/locale/locale.pages.inc, line 642
Interface translation summary, editing and deletion user interfaces.

Code

function locale_translation_language_table($form_element) {

  // Add labels to Language names.
  foreach ($form_element['#options'] as $langcode => $option) {
    $id = $form_element[$langcode]['#id'];
    $title = $option['title'];
    $form_element['#options'][$langcode]['title'] = '<label for="' . $form_element[$langcode]['#id'] . '" class="language-name">' . $title . '</label>';
  }

  // Remove checkboxes of languages without updates.
  if ($form_element['#not_found']) {
    foreach ($form_element['#not_found'] as $langcode) {
      $form_element[$langcode] = array();
    }
  }
  return $form_element;
}