private function _setParams($value, $params)
    {
        $strFinal = $value;
        $key = '';
        for ($i = 0; $i < strlen($strFinal); $i++) {
            if ($strFinal[$i] == ':') { // 1º
                $_a = $i + 1;
                for ($j = $_a; $j < strlen($strFinal); $j++) {
                    $isLastOne = ($j == strlen($strFinal) - 1);
                    if (in_array($strFinal[$j],
                            [
                                ' ',
                                ',',
                                '\\',
                                '\'',
                                '"'
                            ]) || $isLastOne
                    ) { // 2º
                        $_b = $j;
                        $_b = ($isLastOne) ? $_b + 1 : $_b;
                        $key = substr($strFinal, $_a, $_b - $_a);
                        $i = $_b;
                        break;
                    }
                }

                // We found the key
                if (isset($params[$key])) {
                    $langKey = $params[$key];
                    $strFinalA = substr($strFinal, 0, $_a - 1);
                    $strFinalB = substr($strFinal, $_b);
                    $strFinal = $strFinalA . $langKey . $strFinalB;
                }
            }
        }
        return $strFinal;
    }
private function _setParams($value, $params)
    {
        $strFinal = $value;
        $key = '';
        for ($i = 0; $i < strlen($strFinal); $i++) {
            if ($strFinal[$i] == ':') { // 1º
                $_a = $i + 1;
                for ($j = $_a; $j < strlen($strFinal); $j++) {
                    $isLastOne = ($j == strlen($strFinal) - 1);
                    if (in_array($strFinal[$j],
                            [
                                ' ',
                                ',',
                                '\\',
                                '\'',
                                '"'
                            ]) || $isLastOne
                    ) { // 2º
                        $_b = $j;
                        $_b = ($isLastOne) ? $_b + 1 : $_b;
                        $key = substr($strFinal, $_a, $_b - $_a);
                        $i = $_b;
                        break;
                    }
                }

                // We found the key
                if (isset($params[$key])) {
                    $langKey = $params[$key];
                    $strFinalA = substr($strFinal, 0, $_a - 1);
                    $strFinalB = substr($strFinal, $_b);
                    $strFinal = $strFinalA . $langKey . $strFinalB;
                }
            }
        }
        return $strFinal;
    }
private function _setParams ( $ value , $ params ) { $ strFinal = $ value ; $ key = '' ; for ( $ i = 0 ; $ i < strlen ( $ strFinal ) ; $ i ++ ) { if ( $ strFinal [ $ i ] == ':' ) { // 1º $ _a = $ i + 1 ; for ( $ j = $ _a ; $ j < strlen ( $ strFinal ) ; $ j ++ ) { $ isLastOne = ( $ j == strlen ( $ strFinal ) - 1 ) ; if ( in_array ( $ strFinal [ $ j ] , [ ' ' , ',' , '\\' , '\'' , '"' ] ) || $ isLastOne ) { // 2º $ _b = $ j ; $ _b = ( $ isLastOne ) ? $ _b + 1 : $ _b ; $ key = substr ( $ strFinal , $ _a , $ _b - $ _a ) ; $ i = $ _b ; break ; } } // We found the key if ( isset ( $ params [ $ key ] ) ) { $ langKey = $ params [ $ key ] ; $ strFinalA = substr ( $ strFinal , 0 , $ _a - 1 ) ; $ strFinalB = substr ( $ strFinal , $ _b ) ; $ strFinal = $ strFinalA . $ langKey . $ strFinalB ; } } } return $ strFinal ; }
Set the params into the string

@param string $value Input
@param array $params List of params
@return string
Set the params into the string