mistercrunch commented on code in PR #31646:
URL: https://github.com/apache/superset/pull/31646#discussion_r2150793884


##########
superset/views/base.py:
##########
@@ -347,8 +348,18 @@ def cached_common_bootstrap_data(  # pylint: 
disable=unused-argument
 
 
 def common_bootstrap_payload() -> dict[str, Any]:
+    # get locale from URL, else use default locale
+    locale = get_locale()
+    if request.args.get("locale"):
+        try:
+            locale = Locale.parse(request.args.get("locale"))
+            session["locale"] = str(locale)
+            refresh()

Review Comment:
   mmmh, what does refresh do here? I think I'm confused because some of the 
logic around babel comes from Flask-App-Builder ... Like we get some of the 
babel-logic for free from FAB, but not sure how it all works...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to