GitHub user dosubot[bot] added a comment to the discussion: How to set Italian month abbreviations (%b) in table chart date format?
<!-- Answer --> Great questions! Here's what you need to know: **`BABEL_DEFAULT_LOCALE = "it"` is NOT sufficient for chart date formatting.** It only controls UI translations (menu items, labels, etc.), not how dates are rendered in charts. The `%b` format in table charts is powered by D3.js, which has its own separate locale system [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/config.py#L443-L454). **You need to configure `D3_TIME_FORMAT`** in your `superset_config.py`. Your proposed configuration is correct: ```python D3_TIME_FORMAT = { "dateTime": "%x, %X", "date": "%-m/%-d/%Y", "time": "%-I:%M:%S %p", "periods": ["AM", "PM"], "days": ["domenica", "lunedì", "martedì", "mercoledì", "giovedì", "venerdì", "sabato"], "shortDays": ["dom", "lun", "mar", "mer", "gio", "ven", "sab"], "months": ["gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"], "shortMonths": ["gen", "feb", "mar", "apr", "mag", "giu", "lug", "ago", "set", "ott", "nov", "dic"] } ``` The `shortMonths` array is specifically what controls the `%b` output [[2]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/config.py#L427-L441). **Regarding scope:** - **Global by default** — `D3_TIME_FORMAT` applies to all charts across the application once set [[3]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/setup/setupFormatters.ts#L96-L112). It's embedded in the bootstrap data served with every page load [[4]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/views/base.py#L362-L378). - **Per-chart overrides are possible** — Table charts support a `table_timestamp_format` control, and individual columns can have their own `d3TimeFormat` setting [[5]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts#L251-L274). However, these control the *format pattern* (e.g., `%d - %b`), not the *locale strings* (month names). The locale strings (`shortMonths`, `months`, etc.) are always global. - **Existing charts are affected** — since the locale is resolved at render time, all charts using `%b` will pick up the new Italian abbreviations after you restart Superset with the updated config. No need to recreate charts. After adding the config, restart your Superset containers and your table charts should display "15 - gen", "20 - feb", etc. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).* --- Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=6f03ecf3-f0e3-4f14-b928-22ed0027bfa2) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset) GitHub link: https://github.com/apache/superset/discussions/41423#discussioncomment-17434427 ---- 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]
