public function access(RouteMatchInterface
$route_match, AccountInterface
$account) { $mapper =
$this->
getMapperFromRouteMatch($route_match);
try { $langcode =
$mapper->
getLangcode();
} catch (ConfigMapperLanguageException
$exception) { // ConfigTranslationController shows a helpful message if the language
// codes do not match, so do not let that prevent granting access.
$langcode = 'en';
} $source_language =
$this->languageManager->
getLanguage($langcode);