Localizing RadCalendar

6 posts, 0 answers
  1. Bent
    Bent avatar
    38 posts
    Member since:
    Sep 2008

    Posted 07 Jan 2010 Link to this post

    Hi

    When will there be support for localization of the FastNavigationSettings of the RadCalendar?
    I've been searching the forums, but unfortunately it seems like it wasn't supported as of April 2009.

    What I'd like is to have a global way to change _every_ label on every control in RadControls. It seems like some of the controls support custom resource files, but applying changes to the labels "Today" and "Cancel" on every calendar in an application is a pain.
    Wouldn't it be possible to do this? If I can change the skin of every control globally, I would think it would be possible to change the labels as well?


    Kenneth
  2. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 12 Jan 2010 Link to this post

    Hello Kenneth,

    Have you tried RadCalendar.FastNavigationSettings.CancelButtonCaption and TodayButtonCaption. You can localize these properties through ASP.NET Skins and Themes, localization and globalization resources, as well as directly from the page markup.

    Sincerely yours,
    Veli
    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. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jonas Sarunas
    Jonas Sarunas avatar
    19 posts
    Member since:
    Mar 2008

    Posted 29 Jul 2010 Link to this post

    Hi Veli,

    I also had some problem localizing RadCalendar popup window directly from markup.
    I wanted to localize Today button caption.
    My calendar sits on the Blog module which runs under DotNetNuke v.05.04.04 Framework (latest on 2010.07.29).
    Unfortunately, I managed to localize it just from code behind.
    Direct localization from markup doesn't work for me. Problem is that not all characters of my language (Lithuanian)
    are shown properly (probably encoding problem)
    Word 'Today' in lithuanian is 'Šiandien' and first character doesn't appear correctly.
    I tried to use special HTML character for that and it gets not converted to what it suppose to be converted (Š):
    <telerik:RadCalendar ID="calMonth" runat="server"
                         Width="200px"
                         AutoPostBack="True"  
                         TitleFormat="MMMM yyyy"
                         FirstDayOfWeek="Monday"
                         EnableMultiSelect="True"
                         EnableMonthYearFastNavigation="True"
                         EnableNavigation="True"
                         ShowRowHeaders="False"
                         UseRowHeadersAsSelectors="False"
                         ShowColumnHeaders="True"
                         UseColumnHeadersAsSelectors="False"
                         FastNavigationSettings-TodayButtonCaption="&#138;iandien"
                         FastNavigationSettings-OkButtonCaption="Patvirtinti"
                         FastNavigationSettings-CancelButtonCaption="Nutraukti"
                         FastNavigationSettings-ShowAnimation-Type="Fade"
                         FastNavigationSettings-HideAnimation-Type="Fade" >
    </telerik:RadCalendar>

    I get result like displayed in attachment.

    Solution is to localize these buttons from code behind:
    calMonth.FastNavigationSettings.DateIsOutOfRangeMessage = Localization.GetString("RadCalendar.DateIsOutOfRangeMessage", LocalResourceFile)
    calMonth.FastNavigationSettings.TodayButtonCaption = Localization.GetString("RadCalendar.TodayButtonCaption", LocalResourceFile)
    calMonth.FastNavigationSettings.CancelButtonCaption = Localization.GetString("RadCalendar.CancelButtonCaption", LocalResourceFile)
    calMonth.FastNavigationSettings.OkButtonCaption = Localization.GetString("RadCalendar.OkButtonCaption", LocalResourceFile)


    I hope this will be helpful for someone.


    Kind Regards,
    Jonas Šarūnas
  5. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 02 Aug 2010 Link to this post

    Hi Jonas,

    I tested your RadCalendar setup into an empty page and the letter (Š) is properly displayed without any specific encoding settings in the HTML page. Using the entity &#138; will not work, as RadCalendar JSON-serializes these localization settings and the HTML entities are lost on serialization. But the (Š) character displayed OK when typed literally. Check whether you are not using any special encoding for your HTML page that prevents the character from getting displayed.
    Snipp                        
    Regards,
    Veli
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Jonas Sarunas
    Jonas Sarunas avatar
    19 posts
    Member since:
    Mar 2008

    Posted 02 Aug 2010 Link to this post

    Hi Veli,

    I use radcalendar under DotNetNuke and also I use custom compression of the page through HTTP handler maybe that's an issue.
    Thanks anyway

    I will use code behind scenario. That's working and even better I can localize radcalendar from resource files.
    Cool

    Thanks again
    Jonas

    P.S.
    I just have problems working with day click event when in multiselected mode.
    How to get Day Cliked value on server-side? any tips?
    Should I do something with AJAX postback from Client-Side OnDayClick?
    And how to do that properly on that bloody DotNetNuke? :)

    Thanks again
  7. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 02 Aug 2010 Link to this post

    Hello Jonas,

    You can set AutoPostBack="true" for RadCalendar. Now, when you click on a calendar day, RadCalendar will fire its server-side SelectionChanged event. You can subscribe for this event. The event arguments object exposes the SelectedDates collection. Its last item is always the last clicked calendar day. This is how you can tell which calendar day is clicked before the current postback.

    Veli
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017