public function setLanguage($language)
    {
        $language = $language ?: $this->language;
        if (!in_array($language, $this->getSupportedLanguages())) {
            throw new LanguageNotSupportedException(sprintf('Language [%s] is not supported', $language));
        }

        $this->language = $language;
        $this->changeBaseApi();
        return true;
    }