luhu
Posts: 4
Joined: Tue May 31, 2022 12:49 pm

Translate Accessibility features

Hi,

I've managed to translate nearly all necessary accessibility features into another language. But I'm still struggling with one:

Code: Select all

{
    accessibility: {
        axis: {
            // Default
            // xAxisDescriptionSingular: 'The chart has 1 X axis displaying {names[0]}. {ranges[0]}',
            // My translation:
            xAxisDescriptionSingular: 'Das Diagramm hat 1 X Achse mit {names[0]}. {ranges[0]}',
        }
    }
}
I've found the default https://github.com/highcharts/highchart ... ts.ts#L277

My translation is transformed into `Das Diagramm hat 1 X Achse mit Time. […]`.
So the "Time" is not translated properly.

How can I overwrite this? I can't find the translation key to use for "Time" and "values" etc.
luhu
Posts: 4
Joined: Tue May 31, 2022 12:49 pm

Re: Translate Accessibility features

OK I finally found the solution!

There is a place in the highcharts code, that sets hardcoded english fallbacks, if no axis.accessibility.description is set for the chart:
https://github.com/highcharts/highchart ... ies.ts#L98

It would be nice, if this would also be made translatable as the other given examples.
I've now written some logic to create translated fallbacks for my app.
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: Translate Accessibility features

Hi there!

Wow, that's amazing that you have found a solution even before we were able to give you an answer.

But in case of any other questions, please do not hesitate to contact us again!
Best regards
Kamil Musiałowski
Highcharts Developer

Return to “Highcharts Usage”