def strip_langs(url, lang):
    """Strip the part of the url containing any language code

    """
    toks = url.split('/')
    if lang in toks:
        toks.remove(lang)

    url = '/'.join(toks)
    return url