Skip to content

Commit

Permalink
fix(calendar): localize the events page
Browse files Browse the repository at this point in the history
  • Loading branch information
noxilixon committed Sep 6, 2024
1 parent c984f43 commit 2cae1f3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions assets/js/calendar.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Calendar } from '@fullcalendar/core'
import dayGridPlugin from '@fullcalendar/daygrid'
import iCalendarPlugin from '@fullcalendar/icalendar'
import deLocale from '@fullcalendar/core/locales/de';


document.addEventListener('DOMContentLoaded', function () {
const calendarEl = document.getElementById('calendar')
Expand All @@ -13,5 +15,8 @@ document.addEventListener('DOMContentLoaded', function () {
}
]
})
if (document.documentElement.lang === "de") {
calendar.setOption('locale', deLocale);
}
calendar.render()
})

0 comments on commit 2cae1f3

Please sign in to comment.