public static function resolver(string $locale):string
    {
        $file = JsonListener::open(FEnv::get("app.config.file"));
        if (true === property_exists($file, "locale_enabled") &&
            true === $file->locale_enabled) {
            $vals = $file->locale_values;
            return ($vals[0]->$locale);
        }
        throw new Server500(new \ArrayObject(
            array("explain" => "Cannot get locale : App locale mode is not enabled.",
            "solution" => "Please enable the locale mode in config.json to use it")
        ));
    }
public static function resolver(string $locale):string
    {
        $file = JsonListener::open(FEnv::get("app.config.file"));
        if (true === property_exists($file, "locale_enabled") &&
            true === $file->locale_enabled) {
            $vals = $file->locale_values;
            return ($vals[0]->$locale);
        }
        throw new Server500(new \ArrayObject(
            array("explain" => "Cannot get locale : App locale mode is not enabled.",
            "solution" => "Please enable the locale mode in config.json to use it")
        ));
    }
public static function resolver ( string $ locale ) : string { $ file = JsonListener :: open ( FEnv :: get ( "app.config.file" ) ) ; if ( true === property_exists ( $ file , "locale_enabled" ) && true === $ file -> locale_enabled ) { $ vals = $ file -> locale_values ; return ( $ vals [ 0 ] -> $ locale ) ; } throw new Server500 ( new \ ArrayObject ( array ( "explain" => "Cannot get locale : App locale mode is not enabled." , "solution" => "Please enable the locale mode in config.json to use it" ) ) ) ; }
Resolve the correct locale url from locale key
@param string $locale Locale string
@return string the locale url
@throws Server500
Resolve the correct locale url from locale key