src/Localizer.php
public function detect()
    {
        foreach ($this->detectors as $detector) {
            $locales = (array) $this->getInstance($detector)->detect();

            foreach ($locales as $locale) {
                if ($this->isSupportedLocale($locale)) {
                    return $locale;
                }
            }
        }

        return false;
    }
public function detect()
    {
        foreach ($this->detectors as $detector) {
            $locales = (array) $this->getInstance($detector)->detect();

            foreach ($locales as $locale) {
                if ($this->isSupportedLocale($locale)) {
                    return $locale;
                }
            }
        }

        return false;
    }
public function detect ( ) { foreach ( $ this -> detectors as $ detector ) { $ locales = ( array ) $ this -> getInstance ( $ detector ) -> detect ( ) ; foreach ( $ locales as $ locale ) { if ( $ this -> isSupportedLocale ( $ locale ) ) { return $ locale ; } } } return false ; }
Detect any supported locale and return the first match.

@return string|false
Detect any supported locale and return the first match .