original_string: public function setAppLocale($locale = null, $session = true)
      {
          $locale = $locale ?: $this->session->get('_locale', null);
  
          if ($locale)
          {
              $this->app->setLocale($locale);
  
              if ($session)
              {
                  $this->session->put('_locale', $locale);
              }
  
              $this->setTimeLocale($locale);
          }
      }
code: public function setAppLocale($locale = null, $session = true)
      {
          $locale = $locale ?: $this->session->get('_locale', null);
  
          if ($locale)
          {
              $this->app->setLocale($locale);
  
              if ($session)
              {
                  $this->session->put('_locale', $locale);
              }
  
              $this->setTimeLocale($locale);
          }
      }
code_tokens: public function setAppLocale ( $ locale = null , $ session = true ) { $ locale = $ locale ? : $ this -> session -> get ( '_locale' , null ) ; if ( $ locale ) { $ this -> app -> setLocale ( $ locale ) ; if ( $ session ) { $ this -> session -> put ( '_locale' , $ locale ) ; } $ this -> setTimeLocale ( $ locale ) ; } }
docstring: Sets the app locale
  
  @param string $locale
  @param bool $session
  @return void
docstring_tokens: Sets the app locale