Leaving FullCalendar in the language pt-BR

10

Hello, I downloaded a fullcalendar template from Adan Shaw , but the default language is English, I would like to leave it in Portuguese. How do I make this change? Thank you.

    
asked by anonymous 02.12.2015 / 13:32

2 answers

11

Within the folder you downloaded from fullcalendar, you have the lang subfolder containing all languages supported by fullcalendar





Copythept-br.jsjavascriptandaddtoyourproject.

Yourheaderwouldlooklikethis:

<scriptsrc='fullcalendar/fullcalendar.js'></script><scriptsrc='fullcalendar/lang/pt-br.js'></script><script>$(document).ready(function(){$('#calendar').fullCalendar({//todachamadadetextodofullcalendarserábuscadadoarquivopt-br.js});});</script>

Hereyouhavethe official documentation that can help you.

    
02.12.2015 / 14:08
8

Try changing your FullCalendar settings like this:

calendar = $('#calendar').fullCalendar({
    ignoreTimezone: false,
    monthNames: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
    monthNamesShort: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'],
    dayNames: ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sabado'],
    dayNamesShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
    titleFormat: {
        month: 'MMMM yyyy',
        week: "d[ MMMM][ yyyy]{ - d MMMM yyyy}",
        day: 'dddd, d MMMM yyyy'
    },
    columnFormat: {
        month: 'ddd',
        week: 'ddd d',
        day: ''
    },
    axisFormat: 'H:mm',
    timeFormat: {
        '': 'H:mm',
        agenda: 'H:mm{ - H:mm}'
    },
    buttonText: {
        prev: "&nbsp;&#9668;&nbsp;",
        next: "&nbsp;&#9658;&nbsp;",
        prevYear: "&nbsp;&lt;&lt;&nbsp;",
        nextYear: "&nbsp;&gt;&gt;&nbsp;",
        today: "Hoje",
        month: "Mês",
        week: "Semana",
        day: "Dia"
    }
});
    
02.12.2015 / 13:44