logo

FullCalendar

lang

Customize the language and localization options for the calendar.

This settings has been renamed to locale in v3. Also, the lang.js and /lang/*.js files have been similarly renamed.

A String language code. default: "en"

This option affects many things such as:

How to use other languages

You will need to load the language’s JavaScript data file in order to use it. These files are included with the FullCalendar download in the lang/ directory. They must be loaded via a <script> tag after the main FullCalendar library is loaded.

<script src='fullcalendar/fullcalendar.js'></script>
<script src='fullcalendar/lang/es.js'></script>
<script>

  $(function() {

    $('#calendar').fullCalendar({
    });

  });

</script>

If you are simply loading one language, you do not need to specify the lang option. FullCalendar will look at the most recent language file loaded and use it.

However, if more than one language file is loaded, or the combined all.js file is loaded, you must explicitly specify which language to use via the lang option:

<script src='fullcalendar/fullcalendar.js'></script>
<script src='fullcalendar/lang-all.js'></script>
<script>

  $(function() {

    $('#calendar').fullCalendar({
      lang: 'es'
    });

  });

</script>

MomentJS and jQuery UI Datepicker

When you load a FullCalendar language file, it also loads the translations for MomentJS and jQuery UI Datepicker (if the library is already on the page). Just make sure to include the <script> tags for Moment and Datepicker before you include FullCalendar’s language file:

<script src='lib/moment.js'></script>
<script src='lib/jquery-ui.custom-datepicker.js'></script>
<script src='fullcalendar/fullcalendar.js'></script>
<script src='fullcalendar/lang-all.js'></script>