You are here

public function LanguageNegotiationMethodInterface::getLangcode in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/language/src/LanguageNegotiationMethodInterface.php \Drupal\language\LanguageNegotiationMethodInterface::getLangcode()
  2. 9 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.

1 method overrides LanguageNegotiationMethodInterface::getLangcode()
LanguageNegotiationTest::getLangcode in core/modules/language/tests/language_test/src/Plugin/LanguageNegotiation/LanguageNegotiationTest.php
Performs language negotiation.

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);