def METHOD_NAME(s, ietf=False):
    language_match = re.match(".+\.([^\.]+)$" if not ietf
                              else IETF_MATCH, s)
    if language_match and len(language_match.groups()) == 1:
        language = language_match.groups()[0]
        return language
    return s