-
-
Notifications
You must be signed in to change notification settings - Fork 371
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
Internationalization #43
Comments
i've been hoping to side-step these concerns by exposing full control over the axis and legend value gen. uPlot ships with and exposes a fast English formatter [1], and exposes i've always known that whatever label format i chose to ship as the default would only please 20% of uPlot's audience. even if i were to use the intl API directly, i don't see how it would be possible to avoid the snowball effect of offering and supporting a lot more. [1] https://github.com/leeoniya/uPlot/blob/master/src/fmtDate.js |
Yeah, I agree users will want ability to change formats. |
this is likely out of scope for a micro lib. as long as enough nuts and bolts are there to add support externally. thanks for bringing it up tho! |
You can use the
Intl
API to format times so that they render in other language-agnostic format. E.g. I work on a site that supports both English and Spanish and "October" would automatically show up as "Octubre" in my charts on that site because they're using Luxon which uses the browser'sIntl
api under the covers. You don't need to provide any translations as the browser has them built in. You could either use a library like Luxon or use theIntl
API directlyThe text was updated successfully, but these errors were encountered: