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.
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;
}