t('A user-defined date format. See the PHP manual for available options.');
$format = $this->t('Displayed as %date_format', ['%date_format' => $date_formatter->format(REQUEST_TIME, 'custom', $translation_config)]);
return [
'#type' => 'textfield',
'#description' => $description,
'#field_suffix' => ' ' . $format . '',
'#attributes' => [
'data-drupal-date-formatter' => 'source',
],
'#attached' => [
'drupalSettings' => ['dateFormats' => $date_formatter->getSampleDateFormats($translation_language->getId())],
'library' => ['system/drupal.system.date'],
],
] + parent::getTranslationElement($translation_language, $source_config, $translation_config);
}
}