CalendarExtender e Globalizzazione
CalendarExtender è sicuramente uno dei controlli più interessanti forniti assieme ad AJAX Control Toolkit, l'unico problema è che impostando la Culture di una pagina o dell'intera applicazione ad IT-it i nomi dei mesi e alcune label continuano a mostrare il testo in Inglese.
Sul Forum di www.asp.net si può trovare la soluzione:
you must substitute this line in file CalendarBehavior.js:
- this._title.innerHTML = visibleDate.format("MMMM, yyyy"); with this._title.innerHTML = visibleDate.localeFormat("MMMM, yyyy");
- dayCell.title = currentDate.format("D"); with dayCell.title = currentDate.localeFormat("D");
- this._today.innerHTML = "Today: " + todaysDate.format("MMMM d, yyyy"); with this._today.innerHTML = "Today: " + todaysDate.localeFormat("MMMM d, yyyy");
Unfortunately, the string "Today" is mapped into the js file and it not parametrized.
Dopo di che bisogna:
- impostare la Culture a IT-it (per l'italiano)
- impostare la proprietà EnableScriptGlobalitation del controllo ScriptManager a True.