protected function getFallbackLocale($locale)
    {
        if ($position = strpos($locale, '-')) {
            $target = substr($locale, 0, $position);
            $available = $this->getLocaleOptions();
            if (isset($available[$target])) {
                return $target;
            }
        }

        return Config::get('app.fallback_locale');
    }
protected function getFallbackLocale($locale)
    {
        if ($position = strpos($locale, '-')) {
            $target = substr($locale, 0, $position);
            $available = $this->getLocaleOptions();
            if (isset($available[$target])) {
                return $target;
            }
        }

        return Config::get('app.fallback_locale');
    }
protected function getFallbackLocale ( $ locale ) { if ( $ position = strpos ( $ locale , '-' ) ) { $ target = substr ( $ locale , 0 , $ position ) ; $ available = $ this -> getLocaleOptions ( ) ; if ( isset ( $ available [ $ target ] ) ) { return $ target ; } } return Config :: get ( 'app.fallback_locale' ) ; }
Attempt to extract the language from the locale,
otherwise use the configuration.
@return string
Attempt to extract the language from the locale otherwise use the configuration .