Multi-language telerik windows forms

ぃ、小莉子 提交于 2019-12-12 01:59:49

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!