GitHub user ViniciusCavalcanteSantos edited a comment on the discussion: Can't
translate the "Settings" on the menu for brazilian portuguese
i fixed it adding the following code:
```
from superset.translations.utils import get_language_pack
def override_bootstrap_locale(data):
# If the session or user locale is 'pt_BR', force the frontend to use
'pt_BR'
print("Overriding locale to pt_BR if necessary")
print("Current locale in data:", data.get("locale"))
if data.get("locale") == "pt":
data["locale"] = "pt_BR"
data["language_pack"] = get_language_pack('pt_BR')
return data
COMMON_BOOTSTRAP_OVERRIDES_FUNC = override_bootstrap_locale
```
i added the following line: `data["language_pack"] = get_language_pack('pt_BR')`
GitHub link:
https://github.com/apache/superset/discussions/33594#discussioncomment-13290644
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]