public function LocaleConfigSubscriber::onKernelRequestSetDefaultConfigContextLocale

Sets the negotiated interface language on the default configuration context.

Parameters

\Symfony\Component\HttpKernel\Event\GetResponseEvent $event: Kernel event to respond to.

File

drupal/core/modules/locale/lib/Drupal/locale/LocaleConfigSubscriber.php, line 101
Contains \Drupal\locale\LocaleConfigSubscriber.

Class

LocaleConfigSubscriber
Locale Config helper

Namespace

Drupal\locale

Code

public function onKernelRequestSetDefaultConfigContextLocale(GetResponseEvent $event) {

  // Re-initialize the default configuration context to ensure any cached
  // configuration object are reset and can be translated. This will invoke
  // the config context event which will retrieve the negotiated language
  // from the language manager in configContext().
  $this->defaultConfigContext
    ->init();
}