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

Breadcrumb

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

function LanguageNegotiationMethodInterface::getLangcode

Performs language negotiation.

@todo Determine whether string|false or string|null should be the normalized result across all implementations and update the

Parameters

\Symfony\Component\HttpFoundation\Request $request: (optional) The current request. Defaults to NULL if it has not been initialized yet.

Return value

string|null|false A valid language code if the negotiation was successful and either NULL or FALSE otherwise.

and its comment accordingly.

See also

https://www.drupal.org/node/3329952

9 methods override LanguageNegotiationMethodInterface::getLangcode()
LanguageNegotiationBrowser::getLangcode in core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationBrowser.php
Performs language negotiation.
LanguageNegotiationContentEntity::getLangcode in core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationContentEntity.php
Performs language negotiation.
LanguageNegotiationSelected::getLangcode in core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSelected.php
Performs language negotiation.
LanguageNegotiationSession::getLangcode in core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSession.php
Performs language negotiation.
LanguageNegotiationUI::getLangcode in core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUI.php
Performs language negotiation.

... See full list

File

core/modules/language/src/LanguageNegotiationMethodInterface.php, line 57

Class

LanguageNegotiationMethodInterface
Interface for language negotiation classes.

Namespace

Drupal\language

Code

public function getLangcode(?Request $request = NULL);

API Navigation

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