original_string: 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');
      }
code: 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');
      }
code_tokens: 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' ) ; }
docstring: Attempt to extract the language from the locale,
  otherwise use the configuration.
  @return string
docstring_tokens: Attempt to extract the language from the locale otherwise use the configuration .