carbon-charts icon indicating copy to clipboard operation
carbon-charts copied to clipboard

How do we handle language translations

Open zvonimirfras opened this issue 5 years ago • 5 comments

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! :)

zvonimirfras avatar Apr 24 '19 22:04 zvonimirfras

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 avatar Apr 24 '19 22:04 cal-smith

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

cal-smith avatar Apr 24 '19 22:04 cal-smith

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

theiliad avatar Apr 25 '19 19:04 theiliad

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

douglasward avatar Apr 04 '22 19:04 douglasward

@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.

nstuyvesant avatar Aug 02 '23 03:08 nstuyvesant