DayPilot Forums

DayPilot is the best open-source Outlook-like calendar control for ASP.NET.
DayPilot Pro Demo (Calendar control)
» DayPilot Pro live demo (Calendar control)
DayPilot Pro Demo (Scheduler control)
» DayPilot Pro live demo (Scheduler control)
Home » Features » Localize Texts

Localize Texts

Texts like "scroll up", "scroll down", "loading..." should be localizable. We need for example german texts.
Anonymous - 10/11/2007 4:18:56 PM
These text can be localized since 4.1 release. See the following properties:
  • ScrollUpLabelText (DayPilotCalendar)
  • ScrollDownLabelText (DayPilotCalendar)
  • LoadingLabelText (both DayPilotCalendar and DayPilotScheduler)
DayPilotScheduler uses images for scrolling indicators so there is no need for localization.
Dan Letecky - 10/11/2007 4:40:29 PM
Just saw this posting and I was curious where the header text in the scheduler comes from? I'm specifically looking at one that says "Week 2 (January 2008)". I would like this to be localized.. I switched my browser to es_MX and that did not change this text.. So I'm guessing I will need to do something in the code..

Thanks in advance,
Gary
Gary - 1/25/2008 8:21:55 PM
Gary, Sorry for the delay.

This text can be customized using BeforeTimeHeaderRender event. You can modify e.InnerHTML according to your needs. An example of customization can be found in Demo/Scheduler/Default.cs.aspx, line 24 and following.
Dan Letecky - 2/3/2008 5:28:13 PM
Thanks Dan.. We used this code (my coworker got from you site or samples)
e.InnerHTML = String.Format("<a href='javascript:dps1.refreshCallBack(new Date(\"{0}\"), {1})' title='Zoom in'>{2}</a>", JsDate.FormatDateTime(e.Start), days, e.InnerHTML);

This produces the "Week 2 (January 2008)" that I sent in the other email.. What the issue is that when I use Spanish for the Culture the month gets translated properly but the word "Week" does not. This must be coming from the JsDate function..

Gary
Gary - 2/6/2008 3:05:50 AM
It's coming from the original InnerHTML which you are embedding in <a></a> element.

You can try this:
e.InnerHTML = String.Format(
"<a href='javascript:dps1.refreshCallBack(new Date(\"{0}\"), {1})' title='Zoom in'>{2}</a>",
JsDate.FormatDateTime(e.Start), days, DayPilot.Utils.Week.WeekNrISO8601(e.Start)
);
This will show a plain week number in the header.
Dan Letecky - 2/6/2008 9:11:18 AM
Thanks Dan.. I just added a resource lookup for the word "Week" in front of the number and I'm good to go!
By the way.. You might want to mention Localization as a feature.. I didn't notice it mentioned anywhere.

Nice work and thanks again,
Gary
Gary - 2/6/2008 3:00:22 PM
Post reply