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);
        }
    }
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);
        }
    }
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 ) ; } }
Set the application's locale based on the user preference.
@return void
Set the application s locale based on the user preference .