def _validate_locale(locale):
    if locale and locale not in settings.SUMO_LANGUAGES:
        raise Http404

    return locale
Make sure the locale is enabled on SUMO.
dataset/ETHPy150Open mozilla/kitsune/kitsune/community/views.py/_validate_locale