Popup Calendar in Italiano (v10)

Tips submitted by PHPMaker users
Post Reply
marinellimcl
User
Posts: 3

Popup Calendar in Italiano (v10)

Post by marinellimcl »

I tried a tip found in this forum but it didn't work. So I modified it. First of all you need to modify ew_addons.js as below:
<!--##session jscalendar_js_client##-->
<!--##
if (bUseJSCalendar) {
##-->
<link href="calendar/calendar.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="calendar/calendar.min.js"></script>
// <script type="text/javascript" src="calendar/lang/calendar-it.js"></script>
<script type="text/javascript" src="calendar/lang/calendar-<?php echo $gsLanguage ?>.js"></script>
<script type="text/javascript" src="calendar/calendar-setup.js"></script>
<script type="text/javascript" src="<!--##=ew_GetFileNameByCtrlID("ewcalendar.js")##-->"></script>
<!--##
}
##-->
<!--##/session##-->

<!--##session jscalendar_js##-->
// Create calendar
function ew_CreateCalendar(formid, id, format) {
if (id.indexOf("$rowindex$") > -1)
return;
var $ = jQuery, el = ew_GetElement(id, formid), $el = $(el),
$btn = $el.next("button[id^=cal_]").css("height", $el.outerHeight());
$el.data("calendar", Calendar.setup({
inputField: el, // input field
showsTime: / %H:%M(:%S)?$/.test(format), // shows time
ifFormat: format, // date format
button: $btn[0], // button
cache: true // reuse the same calendar object, where possible
})).wrap("<span class=\"input-append\"></span>").after($btn);
}
<!--##/session##-->

Then you need to modify also calendar-it.js (added some rows) in Documents\PHPMaker\Templates\phpv100.zip\extensions\JSCalendar\calendar\lang\calendar-it.js as below:

// ** I18N

// Calendar EN language
// Author: Mihai Bazon, mihai_bazon@yahoo.com
// Translator: Fabio Di Bernardini, altraqua@email.it Corretto da Marcello Marinelli (non funzionava con PHPMaker 10.04)
// Encoding: any
// Distributed under the same terms as the calendar itself.

// For translators: please use UTF-8 if possible. We strongly believe that
// Unicode is the answer to a real internationalized world. Also please
// include your contact information in the header, as can be seen above.

// full day names
Calendar._DN = new Array
("Domenica",
"Luned&igrave",
"Marted&igrave",
"Mercoled&igrave",
"Gioved&igrave",
"Venerd&igrave",
"Sabato",
"Domenica");

// Please note that the following array of short day names (and the same goes
// for short month names, SMN) isn't absolutely necessary. We give it here
// for exemplification on how one can customize the short day names, but if
// they are simply the first N letters of the full name you can simply say:
//
// Calendar.
SDN_len = N; // short day name length
// Calendar._SMN_len = N; // short month name length
//
// If N = 3 then this is not needed either since we assume a value of 3 if not
// present, to be compatible with translation files that were written before
// this feature.

// short day names
Calendar._SDN = new Array
("Dom",
"Lun",
"Mar",
"Mer",
"Gio",
"Ven",
"Sab",
"Dom");

// First day of the week. "0" means display Sunday first, "1" means display
// Monday first, etc.
Calendar._FD = 1;

// full month names
Calendar._MN = new Array
("Gennaio",
"Febbraio",
"Marzo",
"Aprile",
"Maggio",
"Giugno",
"Luglio",
"Augosto",
"Settembre",
"Ottobre",
"Novembre",
"Dicembre");

// short month names
Calendar._SMN = new Array
("Gen",
"Feb",
"Mar",
"Apr",
"Mag",
"Giu",
"Lug",
"Ago",
"Set",
"Ott",
"Nov",
"Dic");

// tooltips
Calendar.TT = {};
Calendar.
TT["INFO"] = "Informazioni sul calendario";

Calendar.TT["ABOUT"] =
"DHTML Date/Time Selector\n" +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
"Per gli aggiornamenti: (external URL not allowed)\n" +
"Distribuito sotto licenza GNU LGPL. Vedi (external URL not allowed) per i dettagli." +
"\n\n" +
"Selezione data:\n" +
"- Usa \xab, \xbb per selezionare l'anno\n" +
"- Usa " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " per i mesi\n" +
"- Tieni premuto a lungo il mouse per accedere alle funzioni di selezione veloce.";
Calendar.
TT["ABOUT_TIME"] = "\n\n" +
"Selezione orario:\n" +
"- Clicca sul numero per incrementarlo\n" +
"- o Shift+click per decrementarlo\n" +
"- o click e sinistra o destra per variarlo.";

Calendar.TT["PREV_YEAR"] = "Anno prec.(clicca a lungo per il men&ugrave)";
Calendar.
TT["PREV_MONTH"] = "Mese prec. (clicca a lungo per il men&ugrave)";
Calendar.TT["GO_TODAY"] = "Oggi";
Calendar.
TT["NEXT_MONTH"] = "Pross. mese (clicca a lungo per il men&ugrave)";
Calendar.TT["NEXT_YEAR"] = "Pross. anno (clicca a lungo per il men&ugrave)";
Calendar.
TT["SEL_DATE"] = "Seleziona data";
Calendar.TT["DRAG_TO_MOVE"] = "Trascina per spostarlo";
Calendar.
TT["PART_TODAY"] = " (oggi)";

// the following is to inform that "%s" is to be the first day of week
// %s will be replaced with the day name.
Calendar._TT["DAY_FIRST"] = "Mostra prima %s";

// This may be locale-dependent. It specifies the week-end days, as an array
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
// means Monday, etc.
Calendar._TT["WEEKEND"] = "0,6";

Calendar.TT["CLOSE"] = "Chiudi";
Calendar.
TT["TODAY"] = "Oggi";
Calendar._TT["TIME_PART"] = "(Shift-)Click o trascina per cambiare il valore";

// date formats
Calendar.TT["DEF_DATE_FORMAT"] = "%d-%m-%Y";
Calendar.
TT["TT_DATE_FORMAT"] = "%a:%b:%e";

Calendar.TT["WK"] = "set";
Calendar.
TT["TIME"] = "Ora:";

//***
Calendar.TT["CLEAR"] = "Cancella";
Calendar.
TT["CLEAR_TIME"] = " Cancella il tempo";
Calendar.TT["NOW"] = "Adesso";
Calendar.
TT["RESET_TIME_TO_NOW"] = "Riporta il tempo ad ora";


marinellimcl
User
Posts: 3

Post by marinellimcl »

I forgot to say that ew_addon.js to modify is in jscalendar.zip (extensions). So you have to unzip it, modify ew_addon.js, zip it again and substitute it to the jscalendar.zip in C:\Program Files (x86)\PHPMaker 10\extensions.


Post Reply