original_string: public function setLanguage($language)
      {
          if (Switcher::getRedirect() == 'route') {
              return redirect(Switcher::getRedirectRoute())->withCookie(Switcher::setLanguage($language));
          }
          if (Switcher::getRedirect() == 'locale') {
              return redirect(Switcher::getLocalBack($language))->withCookie(Switcher::setLanguage($language));
          }
          return back()->withCookie(Switcher::setLanguage($language));
      }
code: public function setLanguage($language)
      {
          if (Switcher::getRedirect() == 'route') {
              return redirect(Switcher::getRedirectRoute())->withCookie(Switcher::setLanguage($language));
          }
          if (Switcher::getRedirect() == 'locale') {
              return redirect(Switcher::getLocalBack($language))->withCookie(Switcher::setLanguage($language));
          }
          return back()->withCookie(Switcher::setLanguage($language));
      }
code_tokens: public function setLanguage ( $ language ) { if ( Switcher :: getRedirect ( ) == 'route' ) { return redirect ( Switcher :: getRedirectRoute ( ) ) -> withCookie ( Switcher :: setLanguage ( $ language ) ) ; } if ( Switcher :: getRedirect ( ) == 'locale' ) { return redirect ( Switcher :: getLocalBack ( $ language ) ) -> withCookie ( Switcher :: setLanguage ( $ language ) ) ; } return back ( ) -> withCookie ( Switcher :: setLanguage ( $ language ) ) ; }
docstring: Set the language and redirect
  @param $language
  @return mixed
docstring_tokens: Set the language and redirect