function LanguageNegotiationMethodInterface::getLangcode

Same name in other branches
  1. 9 core/modules/language/src/LanguageNegotiationMethodInterface.php \Drupal\language\LanguageNegotiationMethodInterface::getLangcode()
  2. 10 core/modules/language/src/LanguageNegotiationMethodInterface.php \Drupal\language\LanguageNegotiationMethodInterface::getLangcode()
  3. 11.x core/modules/language/src/LanguageNegotiationMethodInterface.php \Drupal\language\LanguageNegotiationMethodInterface::getLangcode()

Performs language negotiation.

Parameters

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

Return value

string A valid language code or FALSE if the negotiation was unsuccessful.

10 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.
LanguageNegotiationTest::getLangcode in core/modules/language/tests/language_test/src/Plugin/LanguageNegotiation/LanguageNegotiationTest.php
Performs language negotiation.

... See full list

File

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

Class

LanguageNegotiationMethodInterface
Interface for language negotiation classes.

Namespace

Drupal\language

Code

public function getLangcode(Request $request = NULL);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.