function LanguageNegotiationTest::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.

Overrides LanguageNegotiationMethodInterface::getLangcode

File

core/modules/language/tests/language_test/src/Plugin/LanguageNegotiation/LanguageNegotiationTest.php, line 30

Class

LanguageNegotiationTest
Class for identifying language from a selected language.

Namespace

Drupal\language_test\Plugin\LanguageNegotiation

Code

public function getLangcode(Request $request = NULL) {
  return 'it';
}

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