apache/superset · error

Locale not supported.

Error message

Locale not supported.

What it means

Error "Locale not supported." thrown in apache/superset.

Source

Thrown at superset/initialization/__init__.py:1670

class SupersetIndexView(IndexView):
    @expose("/")
    def index(self) -> FlaskResponse:
        return redirect(url_for("Superset.welcome"))

    @expose("/lang/<string:locale>")
    @safe
    def patch_flask_locale(self, locale: str) -> FlaskResponse:
        """
        Change user's locale and redirect back to the previous page.

        Overrides FAB's babel.views.LocaleView so we can use the request
        Referrer as the redirect target, in case our previous page was actually
        served by the frontend (and thus not added to the session's page_history
        stack).
        """
        if locale not in self.appbuilder.bm.languages:
            abort(404, description="Locale not supported.")
        session["locale"] = locale
        refresh()
        self.update_redirect()

        if redirect_to := request.headers.get("Referer"):
            return redirect(get_safe_redirect(redirect_to))
        return redirect(self.get_redirect())

View on GitHub (pinned to f4587218dd)

Solutions

  1. Use one of the locales listed in LANGUAGES in the Superset configuration.

When it happens

Trigger: A request specifies a locale that Superset does not support.

Common situations: Requesting a locale at startup that is not in the supported languages mapping.


AI-assisted analysis of apache/superset@f4587218dd (2026-08-14). Data as JSON: /api/errors/a3e2ceb6074d58fa. Report an issue: GitHub.