locale_translation_language_table

locale_translation_language_table($form_element)

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.

File

core/modules/locale/locale.module, line 1393
Enables the translation of the user interface to languages other than English.

Code

function locale_translation_language_table($form_element) {
  // 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;
}
doc_Drupal
2016-10-29 09:24:26
Comments
Leave a Comment

Please login to continue.