def get_best_language(accept_lang):

    LUM = settings.LANGUAGE_URL_MAP
    NSL = settings.NON_SUPPORTED_LOCALES
    LC = settings.LANGUAGE_CODE
    langs = dict(LUM)
    # Add in non-supported first to allow overriding prefix behavior.
    langs.update((k.lower(), v if v else LC) for k, v in NSL.items() if
                 k.lower() not in langs)
    langs.update((k.split('-')[0], v) for k, v in LUM.items() if
                 k.split('-')[0] not in langs)
    ranked = parse_accept_lang_header(accept_lang)
    for lang, _ in ranked:
        lang = lang.lower()
        if lang in langs:
            return langs[lang]
        pre = lang.split('-')[0]
        if pre in langs:
            return langs[pre]
    # Couldn't find any acceptable locale.
    return False
Returns the value in the raw db format by default.
dataset/ETHPy150Open mozilla/kitsune/kitsune/sumo/urlresolvers.py/get_best_language--crossover with--dataset/ETHPy150Open viewfinderco/viewfinder/backend/db/schema.py/_SingleValue.Get