You are here

public function LanguageCookieFixedNegotiation::getLangcode in Language Cookie 8

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

tests/modules/language_cookie_test/src/Plugin/LanguageNegotiation/LanguageCookieFixedNegotiation.php, line 29

Class

LanguageCookieFixedNegotiation
Class for identifying language from a selected language.

Namespace

Drupal\language_cookie_test\Plugin\LanguageNegotiation

Code

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