public function setLanguage($language)
    {
        if (!is_string($language) || strlen($language) !== 2) {
            throw new MonetivoException('Language format is invalid');
        }
        $language = strtolower($language);

        $this->language = in_array($language, self::$supported_langs) ? $language : 'en';
    }
public function setLanguage($language)
    {
        if (!is_string($language) || strlen($language) !== 2) {
            throw new MonetivoException('Language format is invalid');
        }
        $language = strtolower($language);

        $this->language = in_array($language, self::$supported_langs) ? $language : 'en';
    }
public function setLanguage ( $ language ) { if ( ! is_string ( $ language ) || strlen ( $ language ) !== 2 ) { throw new MonetivoException ( 'Language format is invalid' ) ; } $ language = strtolower ( $ language ) ; $ this -> language = in_array ( $ language , self :: $ supported_langs ) ? $ language : 'en' ; }
Sets desired language; Defaults to 'en'
@param string $language
@throws MonetivoException
Sets desired language ; Defaults to en