public function changeStatusActivity(string $status)
    {
        if ("enabled" === $status) {
            if (Locale::enableLocale()) {
                return ((new Renderer())->jsonRenderer(array("code" => 200, "msg" => "OK")));
            } else {
                return ((new Renderer())->jsonRenderer(array("code" => 500,
                    "results" => "Locale is already enabled")));
            }
        } elseif ("disabled" === $status) {
            if (Locale::disableLocale()) {
                return ((new Renderer())->jsonRenderer(array("code" => 200, "msg" => "OK")));
            } else {
                return ((new Renderer())->jsonRenderer(array("code" => 500,
                    "results" => "Locale is already disabled")));
            }
        }
        return ((new Renderer())->jsonRenderer(array("code" => 500,
            "results" => "Undefined locale status $status")));
    }
public function changeStatusActivity(string $status)
    {
        if ("enabled" === $status) {
            if (Locale::enableLocale()) {
                return ((new Renderer())->jsonRenderer(array("code" => 200, "msg" => "OK")));
            } else {
                return ((new Renderer())->jsonRenderer(array("code" => 500,
                    "results" => "Locale is already enabled")));
            }
        } elseif ("disabled" === $status) {
            if (Locale::disableLocale()) {
                return ((new Renderer())->jsonRenderer(array("code" => 200, "msg" => "OK")));
            } else {
                return ((new Renderer())->jsonRenderer(array("code" => 500,
                    "results" => "Locale is already disabled")));
            }
        }
        return ((new Renderer())->jsonRenderer(array("code" => 500,
            "results" => "Undefined locale status $status")));
    }
public function changeStatusActivity ( string $ status ) { if ( "enabled" === $ status ) { if ( Locale :: enableLocale ( ) ) { return ( ( new Renderer ( ) ) -> jsonRenderer ( array ( "code" => 200 , "msg" => "OK" ) ) ) ; } else { return ( ( new Renderer ( ) ) -> jsonRenderer ( array ( "code" => 500 , "results" => "Locale is already enabled" ) ) ) ; } } elseif ( "disabled" === $ status ) { if ( Locale :: disableLocale ( ) ) { return ( ( new Renderer ( ) ) -> jsonRenderer ( array ( "code" => 200 , "msg" => "OK" ) ) ) ; } else { return ( ( new Renderer ( ) ) -> jsonRenderer ( array ( "code" => 500 , "results" => "Locale is already disabled" ) ) ) ; } } return ( ( new Renderer ( ) ) -> jsonRenderer ( array ( "code" => 500 , "results" => "Undefined locale status $status" ) ) ) ; }
Change the status of locale
@param string $status Status ["disabled", "enabled"]
@return Renderer
@throws Server500
Change the status of locale