1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

How to use i18n files to localize Highcharts weekday labels?

Discussão em 'Angular' iniciado por AMIT, Outubro 9, 2024 às 10:22.

  1. AMIT

    AMIT Guest

    I am working on a project where I need to localize the weekday labels in Highcharts. I know that I can do it by calling Highcharts.setOptions() before creating the chart, like this:

    javascript

    Highcharts.setOptions({ lang: { weekdays: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'] } });

    However, I want to use i18n translation files instead of hardcoding the labels. My current application already uses i18n for other parts of the UI. How can I pass the weekday labels from i18n files to Highcharts? enter image description here

    Highcharts.setOptions({ lang: { weekdays: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'] } }); Have added levels but unsure how to translate labels.

    Continue reading...

Compartilhe esta Página