public function LanguageNegotiationGraphQL::getLangcode in GraphQL 8.3
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/ LanguageNegotiationGraphQL.php, line 60
Class
- LanguageNegotiationGraphQL
- Class for identifying language from a selected language.
Namespace
Drupal\graphql\Plugin\LanguageNegotiationCode
public function getLangcode(Request $request = NULL) {
return $this->languageContext
->getCurrentLanguage();
}