Voglio usare jQuery datepicker localizzare nel nostro progetto MVC, ma non riesco a trovare le lingue js come file here spiega che abbiamo bisogno di un file come questo: jquery.ui.datepicker-fr.js ma l'unico link che posso trovare è this e in Iran non possiamo accedere a questo, c'è qualche link per scaricare i linguaggi js ?, ho anche bisogno della versione persiana (farsi), qualcosa del genere: jquery.ui.datepicker- fa.jsScarica jQuery script per localizzare datepicker
risposta
francese:
/* French initialisation for the jQuery UI date picker plugin. */
/* Written by Keith Wood (kbwood{at}iinet.com.au) and Stéphane Nahmani ([email protected]). */
jQuery(function($){
$.datepicker.regional['fr'] = {
closeText: 'Fermer',
prevText: '<Préc',
nextText: 'Suiv>',
currentText: 'Courant',
monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
'Jul','Aoû','Sep','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: 'Sm',
dateFormat: 'dd/mm/yy',
firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ''};
$.datepicker.setDefaults($.datepicker.regional['fr']);
});
Farsi:
/* Persian (Farsi) Translation for the jQuery UI date picker plugin. */
/* Javad Mowlanezhad -- [email protected] */
/* Jalali calendar should supported soon! (Its implemented but I have to test it) */
jQuery(function($) {
$.datepicker.regional['fa'] = {
closeText: 'بستن',
prevText: '<قبلي',
nextText: 'بعدي>',
currentText: 'امروز',
monthNames: ['فروردين','ارديبهشت','خرداد','تير','مرداد','شهريور',
'مهر','آبان','آذر','دي','بهمن','اسفند'],
monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
dayNames: ['يکشنبه','دوشنبه','سهشنبه','چهارشنبه','پنجشنبه','جمعه','شنبه'],
dayNamesShort: ['ي','د','س','چ','پ','ج', 'ش'],
dayNamesMin: ['ي','د','س','چ','پ','ج', 'ش'],
weekHeader: 'هف',
dateFormat: 'yy/mm/dd',
firstDay: 6,
isRTL: true,
showMonthAfterYear: false,
yearSuffix: ''};
$.datepicker.setDefaults($.datepicker.regional['fa']);
});
semplicemente aggiungerli separatamente ai file e assegnare loro un nome come richiesto e tutto funzionerà bene ;-)
+1 Questo è gentile e disponibile! –
Forse si può utilizzare http://www.prosoftnearshore.com/blog/post/2011/10/31/Localizing-files-%28jpg-css-js-etc%29-in-ASPNET.aspx per localizzare i file .js per le vostre culture specifiche in combinazione con EvilP 's risposta.
anche se avete bisogno di Jalali-Calendario sul datapicker, è possibile utilizzare questo script http://bugs.jqueryui.com/ticket/3629
Questa risposta mi ha salvato la credibilità oggi. Ho pensato di restituire. Ecco una versione portoghese brasiliana per chi ha bisogno.
jQuery(function($){
$.datepicker.regional['br'] = {
closeText: 'close',
prevText: 'Prev',
nextText: 'Next',
currentText: 'Current',
monthNames: ['Janeiro','Fevereiro','Marco','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez'],
dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'],
dayNamesMin: ['D','S','T','Q','Q','S','S'],
weekHeader: 'D',
dateFormat: 'mm-dd-yyyy',
firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ''};
$.datepicker.setDefaults($.datepicker.regional['br']);
});
per altre lingue o per gli aggiornamenti si può sempre controllare il repository su GitHub: https://github.com/jquery/jquery-ui/ – ithil