我在我的多语言项目中使用了ajaxToolkit:CalendarExtender。这个日历的问题是它本地化了控件中的月份字符串,但没有本地化Today字符串,我还需要本地化这个文本。
在这个问题上,请任何人帮助我。
发布于 2009-11-20 13:01:08
尝尝这个
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;
}发布于 2009-11-21 01:20:48
请尝试将ScriptManager.EnableScriptGlobalization属性更改为True。只要您设置了所需的剪切值,它就应该可以工作。
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);
}https://stackoverflow.com/questions/1768378
复制相似问题