RadCalendar Localization Issue with CultureInfo

2 posts, 0 answers
  1. Karthik Ulaganathan
    Karthik Ulaganathan avatar
    11 posts
    Member since:
    Dec 2009

    Posted 22 Dec 2011 Link to this post

    Hi,
     
         We tried the examples given in the Telerik site for RadCalendar and implemented Localization for the same successfully. But, it works only for the Culture \ CultureInfo properties (like "en-US", "fr-FR") for both RadScheduler and RadCalendar. But, in our application we are using only "CurrentUICulture", which has the value of only neutral culture (like en, fr etc ...) . When this is assigned to the RadCalendar, we are getting the following error:

    Message: Culture 'fr' is a neutral culture. It cannot be used in formatting and parsing and therefore cannot be set as the thread's current culture.
    Stack trace:
       at System.Globalization.

    CultureInfo.CheckNeutral(CultureInfo culture)
       at System.Globalization.CultureInfo.get_DateTimeFormat()
       at Telerik.Web.UI.Scheduler.Views.Month.RendererBase.CreateNavigationPane(Control container)
       at Telerik.Web.UI.Scheduler.Views.Month.Renderer.GetContent()
       at Telerik.Web.UI.RadScheduler.CreateContent()
       at Telerik.Web.UI.RadScheduler.CreateChildControls(Boolean bindFromDataSource)
       at System.Web.UI.Control.EnsureChildControls()
       at System.Web.UI.Control.FindControl(String id, Int32 pathOffset)
       at Telerik.Web.ChildControlHelper.FindControlRecursive(String ID, Control root)
       at Telerik.Web.ChildControlHelper.FindControlRecursive(String ID, Control root)
       at Telerik.Web.ChildControlHelper.FindControlRecursive(String ID, Control root)
       at Telerik.Web.UI.RadAjaxControl.OnPagePreRender(Object sender, EventArgs e)
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at System.Web.UI.Control.OnPreRender(EventArgs e)
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


    But, as per the information given in the link below, the 'CultureInfo' property should also support the two letter ISO Language names like "en" or "fr" etc ..  
         http://www.telerik.com/help/aspnet-ajax/p_telerik_web_ui_radcalendar_cultureinfo.html

    Can you please let us know a solution for this ? How can we assign the 'CurrentUICulture' (TwoLetterISOLanguage Name) value to the 'RadCalendar' control, which has only the 'CultureInfo' property ?

    Thanks & Regards,
    Karthik.
  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 22 Dec 2011 Link to this post

    Hi,

    The problem is that a Thread's culture can not be neutral. It must be specific like en-US or fr-FR. Give this suggestion a try and let me know how it goes.

    Greetings,
    Pavlina
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top