Highcharts DateTime Localization

后端 未结 6 764
伪装坚强ぢ
伪装坚强ぢ 2021-01-31 14:38

Can someone point me to how I can localize the date-related Strings which are hardcoded in the HighCharts js-file. For instance, instead of the default \'Feb\' date label in the

6条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-31 15:22

    Of course if you are using moment in your stack it is pointless to translate again all these strings from scratch:

    moment.locale('it-IT')
    Highcharts.setOptions({
      lang: {
        months: moment.months(),
        weekdays: moment.weekdays(),
        shortMonths: moment.monthsShort(),
        ...
      }
    })
    

提交回复
热议问题