src/I18n/Gettext/Translations.php
public function setLanguage($language)
    {
        $this->setHeader(self::HEADER_LANGUAGE, trim($language));

        if ($info = Language::getById($language)) {
            return $this->setPluralForms(\count($info->categories), $info->formula);
        }

        throw new InvalidArgumentException(sprintf('The language "%s" is not valid', $language));
    }
public function setLanguage($language)
    {
        $this->setHeader(self::HEADER_LANGUAGE, trim($language));

        if ($info = Language::getById($language)) {
            return $this->setPluralForms(\count($info->categories), $info->formula);
        }

        throw new InvalidArgumentException(sprintf('The language "%s" is not valid', $language));
    }
public function setLanguage ( $ language ) { $ this -> setHeader ( self :: HEADER_LANGUAGE , trim ( $ language ) ) ; if ( $ info = Language :: getById ( $ language ) ) { return $ this -> setPluralForms ( \ count ( $ info -> categories ) , $ info -> formula ) ; } throw new InvalidArgumentException ( sprintf ( 'The language "%s" is not valid' , $ language ) ) ; }
Sets the language and the plural forms.

@param string $language

@throws InvalidArgumentException if the language hasn't been recognized

@return self
Sets the language and the plural forms .