vkurko / calendar

Full-sized drag & drop JavaScript event calendar with resource & timeline views
https://vkurko.github.io/calendar/
MIT License
964 stars 82 forks source link

Even the locale is set to ja (Japanese), the today button still show today #261

Closed asdf913 closed 1 month ago

asdf913 commented 1 month ago

The below javascript could be used to create a Calendar with in specified element.

The locale property is set based on the documentation https://github.com/vkurko/calendar?tab=readme-ov-file#locale image

new EventCalendar(document.getElementById("calendar"), {locale: "ja"};

image

The weekday names are displayed property but the today button shows today.

The today button is suggested to be shown 今日 if the locale is to ja.

The below screen shot shows the suggested translation of today provided by Google translate.

image

vkurko commented 1 month ago

The locale option has no effect on the today button. To change the text, use the buttonText option.

buttonText: function (text) {
    text.today = '今日';
    return text;
}