src/Klarna.php
public function setLanguage($language)
    {
        if (!is_numeric($language) && strlen($language) == 2) {
            $this->setLanguage(self::getLanguageForCode($language));
        } else {
            $this->_checkLanguage($language);
            $this->_language = $language;
        }
    }
public function setLanguage($language)
    {
        if (!is_numeric($language) && strlen($language) == 2) {
            $this->setLanguage(self::getLanguageForCode($language));
        } else {
            $this->_checkLanguage($language);
            $this->_language = $language;
        }
    }
public function setLanguage ( $ language ) { if ( ! is_numeric ( $ language ) && strlen ( $ language ) == 2 ) { $ this -> setLanguage ( self :: getLanguageForCode ( $ language ) ) ; } else { $ this -> _checkLanguage ( $ language ) ; $ this -> _language = $ language ; } }
Sets the language used.

<b>Note</b>:<br>
You can use the two letter language code instead of the constant.<br>
E.g. 'da' instead of using {@link KlarnaLanguage::DA}.<br>

@param string|int $language {@link KlarnaLanguage}

@see KlarnaLanguage

@throws KlarnaException
@return void
Sets the language used .