public function setValuePluralized($string, $value, $min = null, $max = null, $domain = null, $locale = null)
    {
        if (!$domain) {
            $domain = 'default';
        }

        if (!$locale) {
            $locale = 'default';
        }

        if (!(isset($this->values[$locale]) && is_array($this->values[$locale]))) {
            $this->values[$locale] = array();
        }

        if (!(isset($this->values[$locale][$domain]) && is_array($this->values[$locale][$domain]))) {
            $this->values[$locale][$domain] = array();
        }

        if (isset($this->values[$locale][$domain][$string]) && is_array($this->values[$locale][$domain][$string])) {
            $lang = $this->values[$locale][$domain][$string];
        } else {
            // NOTE: we kill any value previously stored as there is no way to tell which value to use.
            $lang = array();
        }

        $lang[$this->determineKey($min, $max)] = $value;

        $lang = $this->sortPluralized($lang);

        $this->setValue($string, $lang, $domain, $locale);

        return $this;
    }
public function setValuePluralized($string, $value, $min = null, $max = null, $domain = null, $locale = null)
    {
        if (!$domain) {
            $domain = 'default';
        }

        if (!$locale) {
            $locale = 'default';
        }

        if (!(isset($this->values[$locale]) && is_array($this->values[$locale]))) {
            $this->values[$locale] = array();
        }

        if (!(isset($this->values[$locale][$domain]) && is_array($this->values[$locale][$domain]))) {
            $this->values[$locale][$domain] = array();
        }

        if (isset($this->values[$locale][$domain][$string]) && is_array($this->values[$locale][$domain][$string])) {
            $lang = $this->values[$locale][$domain][$string];
        } else {
            // NOTE: we kill any value previously stored as there is no way to tell which value to use.
            $lang = array();
        }

        $lang[$this->determineKey($min, $max)] = $value;

        $lang = $this->sortPluralized($lang);

        $this->setValue($string, $lang, $domain, $locale);

        return $this;
    }
public function setValuePluralized ( $ string , $ value , $ min = null , $ max = null , $ domain = null , $ locale = null ) { if ( ! $ domain ) { $ domain = 'default' ; } if ( ! $ locale ) { $ locale = 'default' ; } if ( ! ( isset ( $ this -> values [ $ locale ] ) && is_array ( $ this -> values [ $ locale ] ) ) ) { $ this -> values [ $ locale ] = array ( ) ; } if ( ! ( isset ( $ this -> values [ $ locale ] [ $ domain ] ) && is_array ( $ this -> values [ $ locale ] [ $ domain ] ) ) ) { $ this -> values [ $ locale ] [ $ domain ] = array ( ) ; } if ( isset ( $ this -> values [ $ locale ] [ $ domain ] [ $ string ] ) && is_array ( $ this -> values [ $ locale ] [ $ domain ] [ $ string ] ) ) { $ lang = $ this -> values [ $ locale ] [ $ domain ] [ $ string ] ; } else { // NOTE: we kill any value previously stored as there is no way to tell which value to use. $ lang = array ( ) ; } $ lang [ $ this -> determineKey ( $ min , $ max ) ] = $ value ; $ lang = $ this -> sortPluralized ( $ lang ) ; $ this -> setValue ( $ string , $ lang , $ domain , $ locale ) ; return $ this ; }
Set a pluralized value in the translator.

@param string   $string The translation string.

@param string   $value  The translation value.

@param int|null $min    The minimum value of the range (optional - defaults to null).

@param int|null $max    The maximum value of the range (optional - defaults to null).

@param string   $domain The domain (optional - defaults to null).

@param string   $locale The locale  (optional - defaults to null).

@return StaticTranslator
Set a pluralized value in the translator .