How to translate the calendar header of Full Calendar? [closed]

1

Greetings, friends of Stack Overflow! I'm just one step away from completing a calendar using the fantastic Full Calendar plugin, which I'm grateful to have. However, I'm having some translation issues with it:

Unfortunately, the locale / language property is not working correctly in my code (I'm using C # with MVC5 and JS), so I'm having to translate it into the hand:

$('#calendar').fullCalendar({
    monthNames: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio',
        'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro',
        'Novembro', 'Dezembro'],
    dayNamesShort: ['Dom', 'Seg', 'Ter', 'Qua',
        'Qui', 'Sex', 'Sab'],

    defaultDate: new Date(),
    locale: 'pt-BR',
    header: {
        left: 'prev,next today',
        center: 'title',
        right: 'month,agendaWeek'
    },
    columnFormat: 'ddd',

So far, it's all gone, but the only thing I can not translate this way is the "Agenda Header" - The dude refuses to be in Portuguese, and I can not find documentation / just format this property.

Here is an image that shows what I mean:

IwanttotranslatethatpartofDec31,2017-Jan6,2018intoPortuguese,andintothecorrectformat,butasIsaid,theLocalepropertyisnotworking.

Anotherthing:

IamawarethattheLocalepropertyonlyworkswiththelanguageJS(pt-br.js)beingcalledcorrectly.ItisproperlyreferencedinthelocalefolderandtheBundleScriptusedforthiscalendar.

    
asked by anonymous 02.01.2018 / 12:31

1 answer

0

Hello, I did the following to translate everything

When unzipping the zip fullcalendar, you will have the address: fullcalendar / locale / en.js.

Call the file on the page in question

<script src='js/fullcalendar361/fullcalendar.js'></script>
<script src='js/fullcalendar361/locale/pt-br.js'></script>
<script src='js/fullcalendar361/lib/moment.min.js'></script>

$(document).ready(function() {

    $('#calendar').fullCalendar({
        // no script setar "pt-br"
        locale:  'pt-br',

I hope I have helped

    
03.01.2018 / 10:18