function TranslationStatusForm::translationLanguageTable
Same name and namespace in other branches
- main core/modules/locale/src/Form/TranslationStatusForm.php \Drupal\locale\Form\TranslationStatusForm::translationLanguageTable()
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.
Parameters
array $form_element: Form element for the translation table.
Return value
array Populated table.
File
-
core/
modules/ locale/ src/ Form/ TranslationStatusForm.php, line 292
Class
- TranslationStatusForm
- Provides a translation status form.
Namespace
Drupal\locale\FormCode
public function translationLanguageTable(array $form_element) : array {
// 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.