public static function decodeParams($params)
    {
        if(!$params) {
            return [];
        }
        $paramsArrayList = json_decode(json_encode($params), true);
        $decodedParams = [];
        foreach($paramsArrayList as $paramKey=>$paramValue){
            if(is_array($paramValue)) {
                foreach($paramValue as $languageSlug=>$langParamValue){
                    if($languageSlug == App::getLocale()) {
                        $decodedParams[$paramKey] = $langParamValue;
                        break;
                    }else{
                        $decodedParams[$paramKey] = "";
                    }
                }
            }else{
                $decodedParams[$paramKey] = $paramValue;
            }
        }
        return $decodedParams;
    }
public static function decodeParams($params)
    {
        if(!$params) {
            return [];
        }
        $paramsArrayList = json_decode(json_encode($params), true);
        $decodedParams = [];
        foreach($paramsArrayList as $paramKey=>$paramValue){
            if(is_array($paramValue)) {
                foreach($paramValue as $languageSlug=>$langParamValue){
                    if($languageSlug == App::getLocale()) {
                        $decodedParams[$paramKey] = $langParamValue;
                        break;
                    }else{
                        $decodedParams[$paramKey] = "";
                    }
                }
            }else{
                $decodedParams[$paramKey] = $paramValue;
            }
        }
        return $decodedParams;
    }
public static function decodeParams ( $ params ) { if ( ! $ params ) { return [ ] ; } $ paramsArrayList = json_decode ( json_encode ( $ params ) , true ) ; $ decodedParams = [ ] ; foreach ( $ paramsArrayList as $ paramKey => $ paramValue ) { if ( is_array ( $ paramValue ) ) { foreach ( $ paramValue as $ languageSlug => $ langParamValue ) { if ( $ languageSlug == App :: getLocale ( ) ) { $ decodedParams [ $ paramKey ] = $ langParamValue ; break ; } else { $ decodedParams [ $ paramKey ] = "" ; } } } else { $ decodedParams [ $ paramKey ] = $ paramValue ; } } return $ decodedParams ; }
Translate menulinks params to a single dimensional array and returns only current language params

@param  string $params
@return array
Translate menulinks params to a single dimensional array and returns only current language params