{"record":{"id":"a3e2ceb6074d58fa","repo":"apache/superset","slug":"locale-not-supported","errorCode":null,"errorMessage":"Locale not supported.","messagePattern":"Locale not supported\\.","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"superset/initialization/__init__.py","lineNumber":1670,"sourceCode":"\nclass SupersetIndexView(IndexView):\n    @expose(\"/\")\n    def index(self) -> FlaskResponse:\n        return redirect(url_for(\"Superset.welcome\"))\n\n    @expose(\"/lang/<string:locale>\")\n    @safe\n    def patch_flask_locale(self, locale: str) -> FlaskResponse:\n        \"\"\"\n        Change user's locale and redirect back to the previous page.\n\n        Overrides FAB's babel.views.LocaleView so we can use the request\n        Referrer as the redirect target, in case our previous page was actually\n        served by the frontend (and thus not added to the session's page_history\n        stack).\n        \"\"\"\n        if locale not in self.appbuilder.bm.languages:\n            abort(404, description=\"Locale not supported.\")\n        session[\"locale\"] = locale\n        refresh()\n        self.update_redirect()\n\n        if redirect_to := request.headers.get(\"Referer\"):\n            return redirect(get_safe_redirect(redirect_to))\n        return redirect(self.get_redirect())\n","sourceCodeStart":1652,"sourceCodeEnd":1678,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset/initialization/__init__.py#L1652-L1678","documentation":"Error \"Locale not supported.\" thrown in apache/superset.","triggerScenarios":"A request specifies a locale that Superset does not support.","commonSituations":"Requesting a locale at startup that is not in the supported languages mapping.","solutions":["Use one of the locales listed in LANGUAGES in the Superset configuration."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}