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

Localization for WPF application without App.xaml.cs

1 Answer 115 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tanveer-Ibn-
Top achievements
Rank 1
Tanveer-Ibn- asked on 16 Jul 2015, 01:01 AM
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 ?

1 Answer, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 20 Jul 2015, 02:52 PM
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.

Regards,
Tanya
Telerik
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
Tags
General Discussions
Asked by
Tanveer-Ibn-
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Share this question
or