namespace Drupal\language\Form;
use Drupal\Core\Block\BlockManagerInterface;
-use Drupal\Component\Utility\Unicode;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Extension\ThemeHandlerInterface;
$this->blockManager->clearCachedDefinitions();
$form_state->setRedirect('language.negotiation');
- drupal_set_message($this->t('Language detection configuration saved.'));
+ $this->messenger()->addStatus($this->t('Language detection configuration saved.'));
}
/**
'#attributes' => ['class' => ['language-customization-checkbox']],
'#attached' => [
'library' => [
- 'language/drupal.language.admin'
+ 'language/drupal.language.admin',
],
],
];
$table_form['weight'][$method_id] = [
'#type' => 'weight',
- '#title' => $this->t('Weight for @title language detection method', ['@title' => Unicode::strtolower($method_name)]),
+ '#title' => $this->t('Weight for @title language detection method', ['@title' => mb_strtolower($method_name)]),
'#title_display' => 'invisible',
'#default_value' => $weight,
'#attributes' => ['class' => ["language-method-weight-$type"]],
$table_form['enabled'][$method_id] = [
'#type' => 'checkbox',
- '#title' => $this->t('Enable @title language detection method', ['@title' => Unicode::strtolower($method_name)]),
+ '#title' => $this->t('Enable @title language detection method', ['@title' => mb_strtolower($method_name)]),
'#title_display' => 'invisible',
'#default_value' => $enabled,
];