Skip to content
Snippets Groups Projects

Use getLanguages to collect the language ids for path detection

Closed BRIAN STANNARD requested to merge issue/graphql_compose-3445814:2.1.x into 2.1.x
2 files
+ 115
1
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -88,7 +88,7 @@ class RouteLanguage extends DataProducerPluginBase implements ContainerFactoryPl
// Get list of available lang codes for a pre match on the path.
if (!$langcode) {
$prefixes = array_keys($this->languageManager->getStandardLanguageList());
$prefixes = array_keys($this->languageManager->getLanguages());
// If the path starts with a langcode, use that.
if (preg_match('#^/(' . implode('|', $prefixes) . ')($|/)#i', $path, $matches)) {
Loading