private function inSupportedLocales(array $matches)
    {
        foreach (array_keys($matches) as $locale) {
            if ($this->isSupported($locale)) return $locale;

            // Search for acceptable locale by 'regional' => 'fr_FR' match.
            foreach ($this->supportedLocales as $key => $entity) {
                /** @var \Arcanedev\Localization\Entities\Locale $entity */
                if ($entity->regional() == $locale) return $key;
            }
        }

        return null;
    }
private function inSupportedLocales(array $matches)
    {
        foreach (array_keys($matches) as $locale) {
            if ($this->isSupported($locale)) return $locale;

            // Search for acceptable locale by 'regional' => 'fr_FR' match.
            foreach ($this->supportedLocales as $key => $entity) {
                /** @var \Arcanedev\Localization\Entities\Locale $entity */
                if ($entity->regional() == $locale) return $key;
            }
        }

        return null;
    }
private function inSupportedLocales ( array $ matches ) { foreach ( array_keys ( $ matches ) as $ locale ) { if ( $ this -> isSupported ( $ locale ) ) return $ locale ; // Search for acceptable locale by 'regional' => 'fr_FR' match. foreach ( $ this -> supportedLocales as $ key => $ entity ) { /** @var \Arcanedev\Localization\Entities\Locale $entity */ if ( $ entity -> regional ( ) == $ locale ) return $ key ; } } return null ; }
Check if matches a supported locale.

@param  array  $matches

@return null|string
Check if matches a supported locale .