而不是使用完整日历插件我设法使用JavaScript和jQuery将我的事件数据显示到日历(我创建了自己的帖子类型,因为我不知道如何使用WP -Calendar插件)。它工作正常,其他选项工作正常,除了lang选项!
由于FullCalendar以英文显示,我想将其配置为韩语,例如我这样做:
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
});
});
它可以很好地使用单独的PHP(不是每个主题的functions.php
),但现在在WordPress中却没有。有没有人知道为什么这可能会导致问题?
答案 0 :(得分:0)
我还没找到any lang
parameter inside fullcalendar.js
。但是这些选项可以满足您的需求:
// 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'
},