@classmethod<EOL><INDENT>def fromietf(cls, ietf):<DEDENT>
subtags = ietf.split('<STR_LIT:->')<EOL>language_subtag = subtags.pop(<NUM_LIT:0>).lower()<EOL>if len(language_subtag) == <NUM_LIT:2>:<EOL><INDENT>language = cls.fromalpha2(language_subtag)<EOL><DEDENT>else:<EOL><INDENT>language = cls(language_subtag)<EOL><DEDENT>while subtags:<EOL><INDENT>subtag = subtags.pop(<NUM_LIT:0>)<EOL>if len(subtag) == <NUM_LIT:2>:<EOL><INDENT>language.country = Country(subtag.upper())<EOL><DEDENT>else:<EOL><INDENT>language.script = Script(subtag.capitalize())<EOL><DEDENT>if language.script is not None:<EOL><INDENT>if subtags:<EOL><INDENT>raise ValueError('<STR_LIT>' % subtags)<EOL><DEDENT>break<EOL><DEDENT><DEDENT>return language<EOL>
Create a :class:`Language` by from an IETF language code

        :param string ietf: the ietf code
        :return: the corresponding :class:`Language` instance
        :rtype: :class:`Language`