You are here

public function LanguageNegotiationMethodInterface::getLangcode in Drupal 9

Same name and namespace in other branches
  1. 8 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);