问题
I have a full windows application made by Telerik with Ribbons and I want to make it Multi language interface (English and Arabic) I set the localizable property to true and changed the interface for each language.... And created a method that loops on the controls in the form and Apply the resources with the selected language The problem is that I can't find a generic method to loop on the Telerik controls to apply the resources for each Rad Control Please help
Or if there is another way to make the multi language interface, please tell me.
回答1:
I found the solution: I save the Saved Language in the App.config And then In Program.cs i check the saved language and save it in a static value in a class called Common.cs And in Program.cs i run this code:
switch (Common.ApplicationLanguage)
{
case Common.Languages.Arabic:
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("ar-EG");
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("ar-EG");
break;
case Common.Languages.English:
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-GB");
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-GB");
break;
default:
break;
}
来源:https://stackoverflow.com/questions/12762540/multi-language-telerik-windows-forms