'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`'

@classmethod
def fromietf(cls, ietf):

    subtags = ietf.split(u'-')
    language_subtag = subtags.pop(0).lower()
    if (len(language_subtag) == 2):
        language = cls.fromalpha2(language_subtag)
    else:
        language = cls(language_subtag)
    while subtags:
        subtag = subtags.pop(0)
        if (len(subtag) == 2):
            language.country = Country(subtag.upper())
        else:
            language.script = Script(subtag.capitalize())
        if (language.script is not None):
            if subtags:
                raise ValueError((u'Wrong    IETF    format.    Unmatched    subtags:    %r' % subtags))
            break
    return language
