This is a migrated thread and some comments may be shown as answers.

RadCalendar Localization Issue with CultureInfo

3 Answers 77 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Karthik Ulaganathan
Top achievements
Rank 1
Karthik Ulaganathan asked on 22 Dec 2011, 06:17 PM
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.

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 22 Dec 2011, 10:50 PM
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
0
David
Top achievements
Rank 1
answered on 06 May 2019, 06:07 PM

Hello Pavlina,

I don't see a suggestion to try.  Would you post the suggestion to try as I'm having this same issue.  Thank you.

0
Vessy
Telerik team
answered on 07 May 2019, 12:48 PM
Hi David,

The suggestion of Pavlina applied with code will look in a similar way:
<telerik:RadCalendar ID="RadCalendar1" runat="server" CultureInfo="fr-FR"></telerik:RadCalendar>

You can find more details on how to localize RadCalandar in the following article:
https://docs.telerik.com/devtools/aspnet-ajax/controls/calendar/accessibility-and-internationalization/specifying-a-culture

Regards,
Vessy
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Calendar
Asked by
Karthik Ulaganathan
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
David
Top achievements
Rank 1
Vessy
Telerik team
Share this question
or