How to set Italian month abbreviations (%b) in table chart date format? #41423
Replies: 1 comment 2 replies
-
|
Great questions! Here's what you need to know:
You need to configure 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 Regarding scope:
After adding the config, restart your Superset containers and your table charts should display "15 - gen", "20 - feb", etc. To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
I'm using Superset 3.x with table charts that display dates using the format
%d - %b(e.g., "15 - Jan", "20 - Feb"). The abbreviated month names are showing in English instead of Italian.Current Setup
%d - %bBABEL_DEFAULT_LOCALEis set to"it"in configWhat I've Found in the Codebase
In
superset/config.py, there's aD3_TIME_FORMATconfig that can override the default d3 locale:With a structure that includes
monthsandshortMonthsarrays.Questions
How do I set Italian month abbreviations for the
%bformat in table charts?Is setting
BABEL_DEFAULT_LOCALE = "it"sufficient, or do I also need to configureD3_TIME_FORMATwith ItalianshortMonths?If
D3_TIME_FORMATis needed, what's the correct configuration? For example:Does this override apply globally to all charts, or only to new charts?
Is there a per-chart or per-column way to set the locale, or is it only a global config?
Environment:
Beta Was this translation helpful? Give feedback.
All reactions