Docs Advanced Local Pickup How to Translate the Date Picker Calendar Language on checkout page

How to Translate the Date Picker Calendar Language on checkout page

INFO
This snippet applies to the jQuery UI date picker used on the classic cart/checkout. The block checkout (ALP PRO 1.8.5+) renders the pickup date with a React date field, which this snippet does not affect.

Follow these steps to translate the date picker calendar on the cart/checkout page:

1. Open your child theme's functions.php file

Edit the functions.php of your child theme (or use a code-snippets plugin). Don’t edit the parent theme — the change would be lost on theme updates.

2. Insert the following code snippet

The example translates the calendar to French. Note the setDefaults call at the end — without it, defining the language has no effect:

function my_alp_date_picker_translate_script() {
	if ( is_admin() ) {
		return;
	}
	?>
	<script>
	jQuery( function( $ ) {
		if ( ! $.datepicker ) {
			return;
		}
		$.datepicker.regional['fr'] = {
			closeText: 'Fermer',
			prevText: 'Précédent',
			nextText: 'Suivant',
			currentText: 'Aujourd\'hui',
			monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
			monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Juin','Juil','Août','Sept','Oct','Nov','Déc'],
			dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
			dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
			dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
			weekHeader: 'Sem',
			dateFormat: 'dd/mm/yy',
			firstDay: 1, // 0 = Sunday, 1 = Monday
			isRTL: false
		};
		$.datepicker.setDefaults( $.datepicker.regional['fr'] );
	} );
	</script>
	<?php
}
add_action( 'wp_footer', 'my_alp_date_picker_translate_script', 99 );
3. Customize the language

Replace the French texts with your language’s month and day names, adjust dateFormat, and set firstDay to your locale’s first day of the week (0 = Sunday, 1 = Monday).

4. Save the file

Save the changes and reload the cart/checkout page — the pickup date calendar now displays in your language.

Next Steps