def METHOD_NAME(locale=None):
    cur_lang = locale or translation.get_language()
    cur_lang = cur_lang.lower()
    if cur_lang in moment_locales:
        return cur_lang
    if '-' in cur_lang or '_' in cur_lang:
        main = cur_lang.replace("_", "-").split("-")[0]
        if main in moment_locales:
            return main
    return settings.LANGUAGE_CODE