You are here

public function LanguageNegotiationLanguageSelectionPage::getLangcode in Language Selection Page 8.2

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.

Overrides LanguageNegotiationMethodInterface::getLangcode

File

src/Plugin/LanguageNegotiation/LanguageNegotiationLanguageSelectionPage.php, line 32

Class

LanguageNegotiationLanguageSelectionPage
Class for identifying language from a language selection page.

Namespace

Drupal\language_selection_page\Plugin\LanguageNegotiation

Code

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

  // Negotiation is always "unsuccessful". We link to the possible language
  // versions in the language page itself.
  return FALSE;
}