function locale_translation_language_table

Same name in other branches
  1. 9 core/modules/locale/locale.module \locale_translation_language_table()
  2. 10 core/modules/locale/locale.module \locale_translation_language_table()
  3. 11.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.

1 string reference to 'locale_translation_language_table'
TranslationStatusForm::buildForm in core/modules/locale/src/Form/TranslationStatusForm.php
Form builder for displaying the current translation status.

File

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

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] = [];
        }
    }
    return $form_element;
}

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