Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LanguageRequestSubscriber.php

function LanguageRequestSubscriber::onKernelRequestLanguage

Initializes the language manager at the beginning of the request.

Parameters

\Symfony\Component\HttpKernel\Event\RequestEvent $event: The Event to process.

File

core/modules/language/src/EventSubscriber/LanguageRequestSubscriber.php, line 72

Class

LanguageRequestSubscriber
Sets the $request property on the language manager.

Namespace

Drupal\language\EventSubscriber

Code

public function onKernelRequestLanguage(RequestEvent $event) {
    if ($event->isMainRequest()) {
        $this->setLanguageOverrides();
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal