开发者

Localizing "ajaxToolkit:CalendarExtender"

I am using ajaxToolkit:CalendarExtender in my multi lingual project. The problem with this calender is that it localizes the month strings in the control but doesn't localize the Today string and i need to localize this text also.

Please anyone help me out in thi开发者_如何学Pythons problem.


Try changing the ScriptManager.EnableScriptGlobalization property to True. It should work as long as you are setting the desired cutlture value.

    protected void Page_Load(object sender, EventArgs e)
{
    string Lang = “es-MX”;//set your culture here
    System.Threading.Thread.CurrentThread.CurrentCulture =
        new System.Globalization.CultureInfo(Lang);
}


Try this

protected void CalendarExtender1_Load(object sender, EventArgs e)
    {

        CalendarExtender1.TodaysDateFormat = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern;
        // or
        //CalendarExtender1.TodaysDateFormat = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.LongDatePattern;

    }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜