public function setKeyword($keyword, $language = null)
    {
        if (empty($language)) {
            $language = $this->mainLanguageCode;
        }

        if (!is_array($this->keywords)) {
            $this->keywords = [];
        }

        $this->keywords[$language] = $keyword;
    }
public function setKeyword($keyword, $language = null)
    {
        if (empty($language)) {
            $language = $this->mainLanguageCode;
        }

        if (!is_array($this->keywords)) {
            $this->keywords = [];
        }

        $this->keywords[$language] = $keyword;
    }
public function setKeyword ( $ keyword , $ language = null ) { if ( empty ( $ language ) ) { $ language = $ this -> mainLanguageCode ; } if ( ! is_array ( $ this -> keywords ) ) { $ this -> keywords = [ ] ; } $ this -> keywords [ $ language ] = $ keyword ; }
Adds a keyword to keyword collection.

@param string $keyword Keyword to add
@param string $language If not given, the main language is used
Adds a keyword to keyword collection .