Sets the id of the language.

@param string $key Id to set
434343
public function setId( $key )
	{
		if( $key !== null )
		{
			$this->setCode($key);
			$this->_values['id'] = $this->_values['code'];
			$this->_modified = false;
		}
		else
		{
			$this->_values['id'] = null;
			$this->_modified = true;
		}
	}
817041
function setKey($key)
    {
        $this->key = $key;

        if ( CRYPT_RC4_MODE == CRYPT_RC4_MODE_MCRYPT ) {
            return;
        }

        $keyLength = strlen($key);
        $keyStream = array();
        for ($i = 0; $i < 256; $i++) {
            $keyStream[$i] = $i;
        }
        $j = 0;
        for ($i = 0; $i < 256; $i++) {
            $j = ($j + $keyStream[$i] + ord($key[$i % $keyLength])) & 255;
            $temp = $keyStream[$i];
            $keyStream[$i] = $keyStream[$j];
            $keyStream[$j] = $temp;
        }

        $this->encryptIndex = $this->decryptIndex = array(0, 0);
        $this->encryptStream = $this->decryptStream = $keyStream;
    }
1030155
public function setKey($key)
    {
        $this->hash = null;

        if (empty($key)) {
            $this->key = null;
            return;
        }

        $this->key = (string) $key;
        $this->hash = $this->makeHash($key);
    }
138060
public static function setLanguage($language) {
        static::$language = $language;

        static::$message = array();

        $kernalLanguageFolder = dirname(__FILE__) . DIRECTORY_SEPARATOR . '..';
        static::addMessage($kernalLanguageFolder);

        if (defined('API_ROOT')) {
            static::addMessage(API_ROOT);
        }
    }
1162267
public function unset(string $key): void
    {
        $slug = $this->splitKey($key);

        if (is_string($slug)) {
            if (isset($this[$slug])) {
                unset($this[$slug]);
            }
        } else {
            if ($this->has($key)) {
                $this->set($key, null);
            }
        }
    }
1266779
public function setKey($key)
    {
        if ($key === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$key")
            );
        }
        $this->setValue("nb_http_render_descriptor_key", $key);

        return $this;
    }
37807
public function setLanguage($language)
    {
        if (!isset($this->keywords[$language])) {
            $this->language = 'en';
        } else {
            $this->language = $language;
        }
    }
507488
public function setLanguage($language)
    {
        if (!array_key_exists($language, $this->allowedlanguages)) {
            throw new InvalidArgumentException("Invalid language ISO code");
        }
        $this->parameters['language'] = $language;
    }
344678
public function setId($id = '')
    {
        if (is_string($id) && (empty($id) === true || Format::isIdentifier($id, false) === true)) {
            $this->id = $id;
        } else {
            $msg = "The 'id' argument of a body element must be a valid identifier or an empty string";
            throw new InvalidArgumentException($msg);
        }
    }
710263
final public static function SetSessionKey( string $key ) : void {
        
        self::SetConfigFromSetter(
                $key,
                self::akSessionKey,
                self::ValidateSessionKey( )
        );
        
    }
596217
public function delete($id)
    {
        $this->loadModel('Locale.Languages');
        $language = $this->Languages->get($id);

        if (!in_array($language->code, [CORE_LOCALE, option('default_language')])) {
            if ($this->Languages->delete($language)) {
                $this->Flash->success(__d('locale', 'Language successfully removed!'));
            } else {
                $this->Flash->danger(__d('locale', 'Language could not be removed, please try again.'));
            }
        } else {
            $this->Flash->danger(__d('locale', 'You cannot remove this language as it still in use.'));
        }

        $this->title(__d('locale', 'Delete Language'));
        $this->redirect($this->referer());
    }
812718
public function setLanguage(array $language): void
	{
		$this->language = $language['strings'];

		foreach($language['locale'] as $category => $locale)
		{
			setlocale($category, $locale);
		}
	}
489222
public function setDevKey($key)
    {
        $this->validator->validateDeveloperKey($key);

        $this->devKey = $key;

        return $this;
    }
1162194
function addLanguage($languageKey, $content) {
        //If the langage exists and it's an array, add to it instead of replacing it.
        if (is_array($this->getLanguage($languageKey))) {
            $this->languages[$languageKey][] = $content[0];
            return;
        }
        $this->languages[$languageKey] = $content;
        return $this;
    }
502156
public function setId($id = null)
    {
        if ($id !== null) {
            $id = preg_replace("/[^a-z0-9_\\\d]/i", '_', $id);

            $this->id = (string) $id;
        }
    }
1153112
public function setLanguage($lang = null)
    {
        $this->_iLanguage = (int) $lang;
        // reset
        $this->_sViewTable = false;
    }
1204186
public function setCode( $key )
	{
		if ( $key == $this->getCode() ) { return; }

		if ( strlen($key) != 3 || ctype_alpha( $key ) === false ) {
			throw new MShop_Locale_Exception( sprintf( 'Invalid characters in ISO currency code "%1$s"', $key ) );
		}

		$this->_values['code'] = strtoupper( $key );
		$this->_modified = true;
	}