Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n for partial date ticks #247

Open
ryanthemanuel opened this issue Jun 7, 2021 · 3 comments
Open

i18n for partial date ticks #247

ryanthemanuel opened this issue Jun 7, 2021 · 3 comments

Comments

@ryanthemanuel
Copy link

We are receiving feedback from our internationalization folks that some of the ticks that we are seeing in graphs are not properly internationalized.

e.g.

US
image

French
image

The expectation from our internationalization team is that they should be day first and then month. Is that possible? It seems like those representations are all hard coded here: https://github.com/d3/d3-scale/blob/main/src/time.js#L20-L27

@ryanthemanuel
Copy link
Author

@mbostock any thoughts on what could be done to rectify this? We'd be willing to work on a PR to resolve this, but wanted to get a handle on you guys' thoughts about it first.

@mbostock
Copy link
Member

mbostock commented Aug 2, 2021

For now you’ll need to roll your own format as described here: https://github.com/d3/d3-time-format/blob/main/README.md#d3-time-format

Maybe an alternative would be to extend the locale definition in d3-time-format to support the needed shorthands, but my long-term hope is that d3-time-format goes away in favor of JavaScript’s built-in localization (which is already much more capable).

@AshishMotanamGurunadham
Copy link

@mbostock As you said if we extend the locale definition in d3-time-format, can we set our own format from those definitions(not using timeFormat).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants