summaryrefslogtreecommitdiffstats
path: root/core/modules/language/src/Form/LanguageAddForm.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/language/src/Form/LanguageAddForm.php')
-rw-r--r--core/modules/language/src/Form/LanguageAddForm.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/modules/language/src/Form/LanguageAddForm.php b/core/modules/language/src/Form/LanguageAddForm.php
index 1248407..c0ef22b 100644
--- a/core/modules/language/src/Form/LanguageAddForm.php
+++ b/core/modules/language/src/Form/LanguageAddForm.php
@@ -88,12 +88,12 @@ class LanguageAddForm extends LanguageFormBase {
$t_args = ['%language' => $this->entity->label(), '%langcode' => $this->entity->id()];
$this->logger('language')->notice('The %language (%langcode) language has been created.', $t_args);
- drupal_set_message($this->t('The language %language has been created and can now be used.', $t_args));
+ $this->messenger()->addStatus($this->t('The language %language has been created and can now be used.', $t_args));
if ($this->moduleHandler->moduleExists('block')) {
// Tell the user they have the option to add a language switcher block
// to their theme so they can switch between the languages.
- drupal_set_message($this->t('Use one of the language switcher blocks to allow site visitors to switch between languages. You can enable these blocks on the <a href=":block-admin">block administration page</a>.', [':block-admin' => $this->url('block.admin_display')]));
+ $this->messenger()->addStatus($this->t('Use one of the language switcher blocks to allow site visitors to switch between languages. You can enable these blocks on the <a href=":block-admin">block administration page</a>.', [':block-admin' => $this->url('block.admin_display')]));
}
$form_state->setRedirectUrl($this->entity->urlInfo('collection'));
}