original_string: public static function setAppLocale()
      {
          if (Session::has('locale')) {
              App::setLocale(Session::get('locale'));
          }
          elseif (
              ($user = BackendAuth::getUser()) &&
              ($locale = static::get('locale'))
          ) {
              Session::put('locale', $locale);
              App::setLocale($locale);
          }
      }
code: public static function setAppLocale()
      {
          if (Session::has('locale')) {
              App::setLocale(Session::get('locale'));
          }
          elseif (
              ($user = BackendAuth::getUser()) &&
              ($locale = static::get('locale'))
          ) {
              Session::put('locale', $locale);
              App::setLocale($locale);
          }
      }
code_tokens: public static function setAppLocale ( ) { if ( Session :: has ( 'locale' ) ) { App :: setLocale ( Session :: get ( 'locale' ) ) ; } elseif ( ( $ user = BackendAuth :: getUser ( ) ) && ( $ locale = static :: get ( 'locale' ) ) ) { Session :: put ( 'locale' , $ locale ) ; App :: setLocale ( $ locale ) ; } }
docstring: Set the application's locale based on the user preference.
  @return void
docstring_tokens: Set the application s locale based on the user preference .