Translations

Explore an example of a basic Calendar.js instance configured with a translation file, making it easy to localize your calendar and support multiple languages.

Include Files

Make sure you include the following files:

<link rel="stylesheet" href="dist/calendar.js.css">
<script src="dist/calendar.min.js"></script>
<script src="dist/calendar.translations.es.js"></script>

Create DOM Element

Add a new DOM element to house the Calendar.js instance:

<div id="calendar"></div>

Create Calendar.js Instance

Run the following JavaScript to create a new Calendar.js instance with the translations:

const calendarInstance = new calendarJs( "calendar", __TRANSLATION_OPTIONS );

Result

More Information

Looking for another language option? View the complete list of languages supported by Calendar.js here and learn how to localize your calendar.