/** * Sets the active country from a ISO country string * or a KlarnaLanguage constant */ public function setLanguage($language) { if (!is_numeric($language)) { $language = Klarna::getLanguageForCode($language); } else { $language = intval($language); } $this->iKlarnaLanguage = $language; if ($this->oKlarna == NULL) { throw new KlarnaApiException('Error in ' . __METHOD__ . ': Klarna instance not set'); } $this->sLangISO = $this->oKlarna->getLanguageCode($language); }