Calendar language setting
I want to set the language setting of the calendar to Turkish. I would be very grateful if you can help me.
Replies (1)
Hi,
By default, all locals are included in the fullcalendar bundle. You can check the gulp config tools/gulp.config.js
.
fullcalendar: {
src: {
styles: ["{$config.path.node_modules}/fullcalendar/main.min.css"],
scripts: [
"{$config.path.node_modules}/fullcalendar/main.js",
"{$config.path.node_modules}/fullcalendar/locales-all.min.js",
],
},
dist: {
styles: "{$config.dist}/plugins/custom/fullcalendar/fullcalendar.bundle.css",
scripts: "{$config.dist}/plugins/custom/fullcalendar/fullcalendar.bundle.js",
},
},
In your code you can set the required local as shown below:
// Init calendar --- more info: https://fullcalendar.io/docs/initialize-globals
// Locale docs --- https://fullcalendar.io/docs/locale
const calendar = new FullCalendar.Calendar(calendarEl, {
locale: 'tr'
};
Then recompile your assets folder with Gulp or Webpack.
Please note that the build tools are required only in the development environment just to compile the assets when the source folder files are modified. In the hosting/server deployment you will only need the compile assets, no need to install the build tools dependencies there.
Regards.