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

Forums / Developing with Sitefinity / Calendar view culture/localization

Calendar view culture/localization

6 posts, 0 answered
  1. krhyll
    krhyll avatar
    15 posts
    Registered:
    04 Nov 2006
    10 Nov 2009
    Link to this post
    Hi,

    Can not find out how to set correct culture for the calendar view. See picture attached.

    Kristian Hyllestad
    www.spine.no
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    11 Nov 2009
    Link to this post
    Hi krhyll,

    Thank you for using our services.

    f you are using the Events Schedule View control you can do this in two ways - the first one through the control Editor, and the second one by code. The first approach however will require that you this for each Events Schedule View control you have this on your web site. To do this go to the page where you have the control and click Edit on the control. Then click edit on the Scheduler (see attached image), and then go to Appearance section. From there you can set the Culture, depending on which language version of a page the control is located.

    The second approach requires only editing the Events Scheduler View control template a little bit, and then mapping the control to use the edited template. To do this go to ~/Sitefinity/ControlTemplates/Events/EventsScheduleView.ascx and add the following:
    <script type="text/C#" runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
        eventsSchedule.Culture = System.Globalization.CultureInfo.CreateSpecificCulture(System.Threading.Thread.CurrentThread.CurrentUICulture.ToString());
        }
    </script>

    Once you have edited this template you should map it in the controls config file with the following view settings and restart the website:
    <!--Gets or sets the url to EventsScheduleView template.-->
    <viewSettings hostType="Telerik.Events.WebControls.EventsScheduleView" layoutTemplatePath="~/Sitefinity/ControlTemplates/Events/EventsScheduleView.ascx" />

    More information on working with external templates can be found here:
    Introduction to ControlsConfig file
    Mapping a control to use external template

    Regards,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. krhyll
    krhyll avatar
    15 posts
    Registered:
    04 Nov 2006
    11 Nov 2009
    Link to this post
    Hi,

    Thanks for you're repsonse! :)

    Embarrassed I didn't find the Culture ... did previously put in norwegian translations on same dialog, anyhow found it  and solved it! :)

    Would like to use your second solution editing the ~/Sitefinity/ControlTemplates/Events/EventsScheduleView.ascx file. But there is no such file in my Sitefinity v3.7 solution directories. Am I missing something here?

    Kristian Hyllestad
    www.spine.no
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    11 Nov 2009
    Link to this post
    Hello krhyll,

    You need to map the external template for the control.

    1. Login to your account.
    2. Download the external templates zip archive for the version yo use.
    3. In the zip you will download - App_Data you will find a sample ControlsConfig file which has all host types you need to know when map a template.
    4. Get the template EventsScheduleView template as described in the previous post.
    5. Create a sample ControlsConfig file under App_Data and map the tempalte

    6. Restart the application and follow the steps from the previous post.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. krhyll
    krhyll avatar
    15 posts
    Registered:
    04 Nov 2006
    11 Nov 2009
    Link to this post
    Hi Ivan,

    Thanks a lot! :)

    FYI the norwegian translation works great. Not every thing is translated through the .resx files, but it's not a "show stopper" so at this stage no problem.

    The KB at: http://www.sitefinity.com/support/kb.aspx is not accessible for the time being.

    Kristian Hyllestad
    www.spine.no

  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    11 Nov 2009
    Link to this post
    Hello krhyll,

    Thank you for getting back to me. KB section is down due to maintenance. It should be up in the next few days. 

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
6 posts, 0 answered