GitHub user ViniciusCavalcanteSantos added a comment to the discussion: Can't 
translate the "Settings" on the menu for brazilian portuguese

i fixed it adding the following code:
```
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 notifications@superset.apache.org.
To unsubscribe, please send an email to: 
notifications-unsubscr...@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to