Ticket #6828 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

Datepicker: Add en-AU or en-NZ initialisations

Reported by: cim Owned by:
Priority: minor Milestone: 1.8.9
Component: ui.datepicker Version: 1.8.7
Keywords: Cc:
Blocking: Blocked by:

Description

There are no en-AU or en-NZ initialisations for datepicker. Although they are the same as en-GB, it makes it difficult to write applications that set the datepicker initialisation based on the browser's language preference order. I'd therefore like to see the two initialisations below added to jquery-ui-i18n.js (or alternatively, to save space, some mechanism for having a number of initialisations which are identical).

/* English/Australia initialisation for the jQuery UI date picker plugin. */
/* Based on the en-GB initialisation. */
jQuery(function($){
	$.datepicker.regional['en-AU'] = {
		closeText: 'Done',
		prevText: 'Prev',
		nextText: 'Next',
		currentText: 'Today',
		monthNames: ['January','February','March','April','May','June',
		'July','August','September','October','November','December'],
		monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
		'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
		dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
		dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
		dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
		weekHeader: 'Wk',
		dateFormat: 'dd/mm/yy',
		firstDay: 1,
		isRTL: false,
		showMonthAfterYear: false,
		yearSuffix: ''};
	$.datepicker.setDefaults($.datepicker.regional['en-AU']);
});
/* English/New Zealand initialisation for the jQuery UI date picker plugin. */
/* Based on the en-GB initialisation. */
jQuery(function($){
	$.datepicker.regional['en-NZ'] = {
		closeText: 'Done',
		prevText: 'Prev',
		nextText: 'Next',
		currentText: 'Today',
		monthNames: ['January','February','March','April','May','June',
		'July','August','September','October','November','December'],
		monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
		'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
		dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
		dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
		dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
		weekHeader: 'Wk',
		dateFormat: 'dd/mm/yy',
		firstDay: 1,
		isRTL: false,
		showMonthAfterYear: false,
		yearSuffix: ''};
	$.datepicker.setDefaults($.datepicker.regional['en-NZ']);
});

Thanks,

Campbell

Change History

comment:1 Changed 3 years ago by cim

See also ticket #6682

comment:2 Changed 3 years ago by scott.gonzalez

  • Status changed from new to open
  • Summary changed from No en-AU or en-NZ initialisations for datepicker to Datepicker: Add en-AU or en-NZ initialisations

comment:3 Changed 3 years ago by Scott González

  • Status changed from open to closed
  • Resolution set to fixed

Datepicker i18n: Added Australian and New Zealand localizations. Fixes #6828 - Datepicker: Add en-AU or en-NZ initialisations.

Thanks Campbell

Changeset: a4d2a0fa192befd99f15d2ee80668ece89c1ef5f

comment:4 Changed 3 years ago by scott.gonzalez

  • Milestone changed from 1.9 to 1.8.9
Note: See TracTickets for help on using tickets.