public static function getAll():array
    {
        $arr = [];
        if (false === self::isEnabled()) {
            throw new Server500(new \ArrayObject(
                array("explain" => "Cannot get locale from  : Global locale mode is not enabled.",
                    "solution" => "Please enable the locale mode in framework.config.json to use it from your apps")
            ));
        }
        $fileapp = JsonListener::open(FEnv::get("framework.config.core.apps.file"));
        foreach ($fileapp as $one) {
            if (true === JsonListener::exists(FEnv::get("framework.root")."apps/".
                    $one->{"name"}."/config.json")) {
                $file = JsonListener::open(FEnv::get("framework.root")."apps/".
                    $one->{"name"}."/config.json");
                if (true === property_exists($file, "locale_enabled") &&
                     true === $file->locale_enabled &&
                     true === property_exists($file, "trans_type") &&
                     true === property_exists($file, "locale_values") &&
                     true === property_exists($file, "prefer_locale")) {
                    $vals = $file->locale_values;
                    $enabled = $file->locale_enabled;
                    $transtype = $file->trans_type;
                    $preferlocale = $file->prefer_locale;
                    $applocale = new AppLocale();
                    $applocale->setEnabled($enabled);
                    $applocale->setTranstype($transtype);
                    $applocale->setValues((array) $vals);
                    $applocale->setAppname($one->{"name"});
                    $applocale->setPrefer($preferlocale);
                    $arr[$one->{"name"}] = $applocale;
                } else {
                    $arr[$one->{"name"}] = null;
                }
            } else {
                $arr[$one->{"name"}] = null;
            }
        }
        
        return ($arr);
    }
public static function getAll():array
    {
        $arr = [];
        if (false === self::isEnabled()) {
            throw new Server500(new \ArrayObject(
                array("explain" => "Cannot get locale from  : Global locale mode is not enabled.",
                    "solution" => "Please enable the locale mode in framework.config.json to use it from your apps")
            ));
        }
        $fileapp = JsonListener::open(FEnv::get("framework.config.core.apps.file"));
        foreach ($fileapp as $one) {
            if (true === JsonListener::exists(FEnv::get("framework.root")."apps/".
                    $one->{"name"}."/config.json")) {
                $file = JsonListener::open(FEnv::get("framework.root")."apps/".
                    $one->{"name"}."/config.json");
                if (true === property_exists($file, "locale_enabled") &&
                     true === $file->locale_enabled &&
                     true === property_exists($file, "trans_type") &&
                     true === property_exists($file, "locale_values") &&
                     true === property_exists($file, "prefer_locale")) {
                    $vals = $file->locale_values;
                    $enabled = $file->locale_enabled;
                    $transtype = $file->trans_type;
                    $preferlocale = $file->prefer_locale;
                    $applocale = new AppLocale();
                    $applocale->setEnabled($enabled);
                    $applocale->setTranstype($transtype);
                    $applocale->setValues((array) $vals);
                    $applocale->setAppname($one->{"name"});
                    $applocale->setPrefer($preferlocale);
                    $arr[$one->{"name"}] = $applocale;
                } else {
                    $arr[$one->{"name"}] = null;
                }
            } else {
                $arr[$one->{"name"}] = null;
            }
        }
        
        return ($arr);
    }
public static function getAll ( ) : array { $ arr = [ ] ; if ( false === self :: isEnabled ( ) ) { throw new Server500 ( new \ ArrayObject ( array ( "explain" => "Cannot get locale from  : Global locale mode is not enabled." , "solution" => "Please enable the locale mode in framework.config.json to use it from your apps" ) ) ) ; } $ fileapp = JsonListener :: open ( FEnv :: get ( "framework.config.core.apps.file" ) ) ; foreach ( $ fileapp as $ one ) { if ( true === JsonListener :: exists ( FEnv :: get ( "framework.root" ) . "apps/" . $ one -> { "name" } . "/config.json" ) ) { $ file = JsonListener :: open ( FEnv :: get ( "framework.root" ) . "apps/" . $ one -> { "name" } . "/config.json" ) ; if ( true === property_exists ( $ file , "locale_enabled" ) && true === $ file -> locale_enabled && true === property_exists ( $ file , "trans_type" ) && true === property_exists ( $ file , "locale_values" ) && true === property_exists ( $ file , "prefer_locale" ) ) { $ vals = $ file -> locale_values ; $ enabled = $ file -> locale_enabled ; $ transtype = $ file -> trans_type ; $ preferlocale = $ file -> prefer_locale ; $ applocale = new AppLocale ( ) ; $ applocale -> setEnabled ( $ enabled ) ; $ applocale -> setTranstype ( $ transtype ) ; $ applocale -> setValues ( ( array ) $ vals ) ; $ applocale -> setAppname ( $ one -> { "name" } ) ; $ applocale -> setPrefer ( $ preferlocale ) ; $ arr [ $ one -> { "name" } ] = $ applocale ; } else { $ arr [ $ one -> { "name" } ] = null ; } } else { $ arr [ $ one -> { "name" } ] = null ; } } return ( $ arr ) ; }
Get all local
@return array lacales array object
@throws Server500
Get all local