CalendarExtender and globalization. RRS feed

  • Question

  • User-1577099521 posted

    Hi. I noticed that CalendarExtender only works in English.

    Although the Format parameter can customize the way it fills the textbox, there should be a way to display the calendar itself in other languages.

    Since Ajax Extensions has everything needed to create a calendar in any language, it could have a property "Culture" that gets the current ASP.NET culture defined in web.config, or even no property at all, and just works like the Calendar in .NET, get the current UICulture and voilá. Even the format gets the a default format depending on the language.

    thanks,.great job.

    Friday, January 26, 2007 7:05 PM

All replies

  • User1805950281 posted


    Hi, [:)]

    try to set the ScriptManager .EnableScriptGlobalization = True

    it Works!! [:D]


    Friday, January 26, 2007 10:56 PM
  • User-1577099521 posted

    Hi. I tried your solution.

    while the day names (mon, tue, etc) are translated, the header (January, 2007) and the footer (Today: January 28, 2007) are always in english.


    Anything else? 

    Sunday, January 28, 2007 6:10 AM
  • User-1896312934 posted

    I have the same problem. Day names are translated, the header and the footer are not.

    Monday, January 29, 2007 3:21 AM
  • User202920570 posted

    If you look at the source .js, you'll see that "Today" is a hardcoded string.

    I also need to globalize my CalendarExtender but I can't use the ScriptManager globalization, I have to customize it to be able to edit the month and day names to whatever text the user wants.  I've downloaded the .cs sourcecode in the toolkit but I'm a bit lost on how to recompile a custom version of the Extender and get it to be visible when I try to add it to my toolbox.

    Monday, January 29, 2007 8:06 AM
  • User-113243429 posted

    set the EnableGloblisation property of script manager true

    and do the changes in calenderbehaviour.js

    In particular, 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.


    And it's all done.

    Bye, Thanks for the help to you all

    Monday, January 29, 2007 12:44 PM
  • User2111504239 posted

    Sorry, stupid noob-question. [*-)]

    Where can I find the calenderbehaviour.js?
    Even in the sample app I can't find the file.


    Thank you. 

    Thursday, February 22, 2007 4:41 AM
  • User-1374855374 posted

    It's compiled into the dll's resources. To change it you need to donwload the Toolkit's sources.


    Then you either recompile or simply copy the CalendarBehaviour.js to your site and set it's path in the component's "ScriptPath" property.



    Thursday, February 22, 2007 6:59 AM
  • User718125627 posted

    Hi there,

    I've made the changes to the calenderbehavior.js as told above. I implemented also the code from the very bottom of the thread http://forums.asp.net/thread/1550012.aspx. Cause I'm very new to this stuff can anyone give me a clue how to recompile a DLL so that the changes take effekt.

    THX in advance

    Thursday, February 22, 2007 8:03 AM
  • User-1637953293 posted

    Actually can translate the string "Today" by using UICulture

    Saturday, July 11, 2009 1:01 PM
  • User-609874530 posted

    Step 1. Enable culturization in your page: <%@ Page UICulture="es" Culture="es-MX" %> for spanish, for example;

    Step 2. Enable the scriptmanager to use the globalisation: <asp:ScriptManager ID="ScriptManager1" runat="server" EnableScriptGlobalization="true"/>

    and everything should work out as you wish for.

    Wednesday, February 15, 2012 6:36 AM