-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Open
Labels
embeddedi18nNamespace | Anything related to localizationNamespace | Anything related to localization
Description
Bug description
I use the following code to set the correct locale:
def set_locale_from_url_param():
from flask import session, request
locale_param = request.args.get('lang')
if locale_param:
supported_locales = ['de', 'fr']
if locale_param in supported_locales:
session["locale"] = locale_param
FLASK_APP_MUTATOR = lambda app: app.before_request(set_locale_from_url_param)
That works fine, however, the call to language_pack/<lang>/ is unauthorized because the guest token is not set yet.
Screenshots/recordings
No response
Superset version
6.0.0rc4
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
- I have searched Superset docs and Slack and didn't find a solution to my problem.
- I have searched the GitHub issue tracker and didn't find a similar bug report.
- I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Metadata
Metadata
Assignees
Labels
embeddedi18nNamespace | Anything related to localizationNamespace | Anything related to localization