Opened 5 years ago

Closed 5 years ago

#9175 closed feature (fixed)

Datepicker: Add Italian in Switzerland locale

Reported by: tweakmaista Owned by:
Priority: minor Milestone: 1.11.0
Component: ui.datepicker Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:

Description

jQueryUi includes some Internationalizations, ecpecially for the Datepicker. Of the available Internationalization js files misses a specific one for the Italian used in Switzerland. It is mostly like the existing italian (jquery.ui.datepicker-it.min.js), but the notation of the date (dateformat) is different. For the switzerland's variant of French this is already done.

dateFormat:"dd.mm.yy" instead of dateFormat:"dd/mm/yy"

I made up a file for me, named (jquery.ui.datepicker-it-CH.min.js), here is the content

/* Italian initialisation for the jQuery UI date picker plugin. */
/* Written by Antonello Pasella (antonello.pasella@gmail.com). */
jQuery(function($){
	$.datepicker.regional['it'] = {
		closeText: 'Chiudi',
		prevText: '<Prec',
		nextText: 'Succ>',
		currentText: 'Oggi',
		monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
			'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
		monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
			'Lug','Ago','Set','Ott','Nov','Dic'],
		dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'],
		dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
		dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'],
		weekHeader: 'Sm',
		dateFormat: 'dd.mm.yy',
		firstDay: 1,
		isRTL: false,
		showMonthAfterYear: false,
		yearSuffix: ''};
	$.datepicker.setDefaults($.datepicker.regional['it-CH']);
});

I ask you to include it to allow other to have Switzerlands italian style too. Please review it, because there may be other issues besides the date format, that I am not aware to. Also, probably the last line requires some changes elsewhere, since the string it-CH is new.

I have posted here https://github.com/jquery/jqueryui.com/issues/41

But was redirected to this tracker.

Change History (2)

comment:1 Changed 5 years ago by Scott González

Milestone: none1.11.0
Summary: Request to add internationalization for Italian in SwitzerlandDatepicker: Add Italian in Switzerland locale

comment:2 Changed 5 years ago by Scott González

Resolution: fixed
Status: newclosed

Datepicker Added it-CH locale. Fixes #9175 - Datepicker: Add Italian in Switzerland locale.

Changeset: ae4753b3f1c8d320e11a63f028ec02dc621d24e9

Note: See TracTickets for help on using tickets.