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;
    }
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;
    }
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 ; }
Set the language the api should use
@param string $language
Set the language the api should use