1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Language Formating

Language Formating

4 posts, 0 answered
  1. Falcon325
    Falcon325 avatar
    9 posts
    Registered:
    18 Sep 2006
    25 Jan 2008
    Link to this post
    Hi Guys,
    Need to know how one would be able to change the date description in the NewsList module into another language, I've already changed it in the calendar News Calendar control.
    Thanks
    Sean
  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    25 Jan 2008
    Link to this post
    Hello Sean,

    We are sorry for not being able to help you immediately but It is not quite clear what exactly you want to achieve. Please describe the changes that you have made in News Calendar control to understand what functionality you need to implement. Also, what do you mean by "NewsList module" - NewsList public control or administration of News module?

    Thanks for your cooperation in advance.

    Kind regards,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Falcon325
    Falcon325 avatar
    9 posts
    Registered:
    18 Sep 2006
    25 Jan 2008
    Link to this post
    Sorry for the misunderstanding on my part, in essence you'll find the following code in the "NewsCalendar" control under the  ./Sitefinity/UserControls/ folder. this particular line of code allows you to change the language and ate format for this control;

    <radCln:radcalendar id="RadCalendar1" runat="server" AutoPostBack="true" ClientEvents-OnDateSelecting="OnCalendarSelecting" titleformat="MMMM yyyy"

    UseColumnHeadersAsSelectors="false" UseRowHeadersAsSelectors="false" showothermonthsdays="true" cultureinfo="Italian (Italy)"

    enablemultiselect="false" showrowheaders="false" SelectedDayStyle-CssClass="selectedDay">

    <ClientEvents OnDateSelecting="OnCalendarSelecting" />

    <SelectedDayStyle CssClass="selectedDay" />

    </radCln:radcalendar>

    I've highlighted in red the area where itìs possible to change the language. For the item in question, the NewsList control under /Sitefinity/ControlTemplates/News/ I don't see anywhee I can modify it without creating one from scratch. If there is another method, let me know, otherwise I'll do the honors myself and submit the finished product to you.

    Thanks in advance, and again sorry for the mix up.

  4. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    28 Jan 2008
    Link to this post
    Hello Sean,

    You could change the date format of the Publication Date from ~/Sitefinity/ControlTemplates/News/NewsList.ascx template. Regarding the culture, it will take the culture settings of the browser.

    <asp:Repeater ID="newsRepeater" runat="server"
        <ItemTemplate> 
            <class="newsdate"><%#DataBinder.Eval(Container.DataItem, "Publication_Date", "{0:MMMM yyyy}")%></p

    But you could create a custom control that inherits from Control and ITextControl and provides properties for setting the culture info and date format. In fact this control will help in customizing the dates in your project.

    Hope this is helpful for you. Let us know if you need any further assistance.

    Sincerely yours,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
4 posts, 0 answered