CalendarExtender e Globalizzazione

Published 6 February 7 7:3 PM | mario74

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:

  1. this._title.innerHTML = visibleDate.format("MMMM, yyyy"); with this._title.innerHTML = visibleDate.localeFormat("MMMM, yyyy");
  2. dayCell.title = currentDate.format("D"); with dayCell.title = currentDate.localeFormat("D");
  3. 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:

  1. impostare la Culture a IT-it (per l'italiano)
  2. impostare la proprietà EnableScriptGlobalitation del controllo ScriptManager a True.


Filed under: ,