lang option does not work in wordpress

instead of using a Full Calendar plugin, I managed to use the JavaScript and jQuery to display my event data to a calendar (I created my own post type as I do not know how to use WP-Calendar plugin). It works fine and other options works fine except lang option!

As FullCalendar displays it in English, I wanted to configure it to Korean so for example I did it like this:

Read More
jQuery(document).ready(function(){

            jQuery('#calendar').fullCalendar({
                theme: true,
                lang: 'ko',
                header: {
                    left: 'prev, next today',
                    center: 'title',
                    right: 'month,agendaWeek,agendaDay'
                },
                events: themeforce.events
            });
    });

It worked fine a separate PHP (not the functions.php for each theme) but now in WordPress it does not. Does anyone have any idea why this might cause a problem?

Plugin website: https://wordpress.org/plugins/wp-calendar/

Related posts

Leave a Reply

1 comment

  1. I haven’t found any lang parameter inside fullcalendar.js. But these options will do what you need:

    // time formats
    titleFormat: {
        month: 'MMMM yyyy',
        week: "MMM d[ yyyy]{ '—'[ MMM] d yyyy}",
        day: 'dddd, MMM d, yyyy'
    },
    columnFormat: {
        month: 'ddd',
        week: 'ddd M/d',
        day: 'dddd M/d'
    },
    timeFormat: { // for event elements
        '': 'h(:mm)t' // default
    },
    
    // locale
    isRTL: false,
    firstDay: 0,
    monthNames: ['January','February','March','April','May','June','July','August','September','October','November','December'],
    monthNamesShort: ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
    dayNames: ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],
    dayNamesShort: ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],
    buttonText: {
        prev: ' ◄ ',
        next: ' ► ',
        prevYear: ' << ',
        nextYear: ' >> ',
        today: 'today',
        month: 'month',
        week: 'week',
        day: 'day'
    },