Problem/Motivation
The highcharts javascript library provide a way to apply global options to all charts on the same page using Highcharts.setOptions as demonstrated at https://www.highcharts.com/docs/getting-started/how-to-set-options#globa....
Steps to reproduce
For multi lingual website try to translate text like the one related to download csv, pdf or svg.
Proposed resolution
There is a lot of options that can be set globally and I think for the highcharts submodule, by default it should support the following language options for translations purpose:
- lang.downloadCSV
- lang.downloadJPEG
- lang.downloadPDF
- lang.downloadPNG
- lang.downloadSVG
- lang.downloadXLS
- lang.exitFullscreen
- lang.hideData
- lang.loading
- lang.mainBreadcrumb
- lang.months
- lang.noData
- lang.printChart
- lang.resetZoom
- lang.resetZoomTitle
- lang.shortMonths
- lang.shortWeekdays
- lang.viewData
- lang.viewFullscreen
- lang.weekdays
Note that this is not an exhaustive list of lang related global options but other can be added later if there is a use case for them.
Remaining tasks
Provide a patch or MR.
User interface changes
New form inputs will show up when setting up highcharts form.
API changes
Nothing at the moment apart that now we need to set the global options.
Data model changes
N/A
Issue fork charts-3317613
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
nikathoneThis is initial patch is ready for review but I am not sure if we should add test coverage for the post update and feature. That is why I set it to needs work for now.
Comment #6
andileco commentedI tested on a couple sites and it worked as expected. Thanks for the patch!