symfony2 adesigns calendar-bundle translation

时间:2015-09-06 17:03:13

标签: symfony calendar fullcalendar bundle translate

我实际上是尝试使用adesigns(adesigns / calendar-bundle“:”1.2-beta“)中的日历包,并进行翻译,但似乎没有翻译。

$('#calendar-holder').fullCalendar({
    header: {
        left: 'prev, next',
        center: 'title',
        right: 'month, basicWeek, basicDay,'
    },
    lazyFetching: true,
    timeFormat: {
        // for agendaWeek and agendaDay
        agenda: 'h:mmt',    // 5:00 - 6:30

        // for all other views
        '': 'h:mmt'         // 7p
    },
    //Set to True to show Calendar Week in seperate Row/Field of Calendar View
    weekNumbers: false,
    //Set to your Language to change the text, the first day of week etc according to your settings.
    lang: 'fr',

所以我的日历应该是法语,但我仍然用英语获得我的月/日。

有人已经做过吗?

1 个答案:

答案 0 :(得分:0)

也许这不是最好的解决方案,我认为捆绑只接受' en'因为代码已被编码。 我建议你拿起文件包/ adesignscalendar / js / fullcalendar / jquery.fullcalendar.min.js,在你的包中复制一份,包括这个新文件而不是另一个,制作你需要的所有翻译。 您也可以添加参数' lang:es',每个翻译,即

$('#calendar-holder').fullCalendar({
...
dayNamesShort : [ 'Dom', 'Lun', 'Mar', 'Mie', 'Jue', 'Vie', 'Sab' ],
...
buttonText : { prev : ' ◄ ', next : ' ► ',
        prevYear : ' << ', nextYear : ' >> ',
        today : 'hoy', month : 'mes', week : 'semana', day : 'dia' },
...
});

我希望这可以帮助别人。