Localization for WPF application without App.xaml.cs

2 posts, 0 answers
  1. Tanveer-Ibn-
    Tanveer-Ibn- avatar
    1 posts
    Member since:
    Jul 2015

    Posted 15 Jul 2015 Link to this post

    I have to implement multilingual support for an application that is mainly an winform application. But some ​forms  of the application has been converted to WPF and they used Telerik RadGridview control. These WPF forms are launched from inside the Winform application. So the WPF project does not have any app.xaml.cs files , so no app_startup event. From examples I have seen that the UICulture has to be set in that event . Also the Localization manager has to be set in that particular event. I have tried setting the culture in form level, before initializing components, but did not work. Is there a way to implement Localization for Telerik controls in the mentioned scenario ?
  2. Tanya
    Tanya avatar
    583 posts

    Posted 20 Jul 2015 Link to this post

    Hello Tanveer-Ibn,

    You could try to change the current UI culture before the InitializeComponent() method of the window where the RadGridView is:
    System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("fr");
    System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("fr");

    This approach will set the default startup language of the control as it is explained in this article from our documentation.

    You may find useful to check the Localization demo, which is demonstrating how to dynamically change the language of the RadGridView. To test it, you could download our application for WPF or check the Silverlight version of this demo directly in your browser.

    I hope this helps.

    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 Feedback Portal and vote to affect the priority of the items
Back to Top