carbon-design-system / carbon-charts

:bar_chart: :chart_with_upwards_trend:⠀Robust dataviz framework implemented using D3 & typescript
https://charts.carbondesignsystem.com
Apache License 2.0
912 stars 185 forks source link

How do we handle language translations #260

Open zvonimirfras opened 5 years ago

zvonimirfras commented 5 years ago

We need a way to let users translate hardcoded strings (like the ones on aria-labels).

In carbon-components-angular, we have (simply put) inputs that initialize from json files and users can provide either json files or override inputs directly, it's been working great so far.

Something that provides similar functionality would be awesome here.

Discuss! :)

cal-smith commented 5 years ago

I think short term we can keep it in the config ... long term we'll probably want to look at integrating something from i18next https://www.i18next.com/

Especially considering we'll need to provide support for things like numbers/time/date/currency/etc

cal-smith commented 5 years ago

Something I'm thinking on as I tinker with the refactor is how we want to support theming ... I18n will follow the same pattern as the theme provider I think

theiliad commented 5 years ago

Yes, definitely. I like the idea of providers. Theme and i18n should also work in a similar way

douglasward commented 2 years ago

What's the status here? We really need to provide translations for our product and also handle the localization of numbers/dates/currencies etc.

nstuyvesant commented 1 year ago

@zvonimirfras - does this issue (https://github.com/carbon-design-system/carbon-charts/issues/1635) address what you're running into? If so, perhaps consider closing this one so we can consolidate. Feel free to update the other issue if you'd like to see anything changed.