public function setValue($string, $value, $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();
        }

        $this->values[$locale][$domain][$string] = $value;

        return $this;
    }
public function setValue($string, $value, $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();
        }

        $this->values[$locale][$domain][$string] = $value;

        return $this;
    }
public function setValue ( $ string , $ value , $ 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 ( ) ; } $ this -> values [ $ locale ] [ $ domain ] [ $ string ] = $ value ; return $ this ; }
Set a translation value in the translator.

@param string $string The string to translate.

@param mixed  $value  The value to store.

@param string $domain The domain to use.

@param string $locale The locale (otherwise the current default locale will get used).

@return StaticTranslator
Set a translation value in the translator .