I am developing a c# Winforms application using VS 2008 and DevExpress.

In one form, I need the some data to be added both in English and Chinese Language. So I placed separate textboxes for both Chinese and English and two buttons on form. one Button click shows Chinese language section and changes Inputlanguage . Second button hides Chinese language section, Changes InputLanguage .

When I run the application, First time when I change to Chinese Language, I am getting Chinese language selection option on typing English letter combination. But after returning to English, if I again go to Chinese data entry, I am not getting Chinese Language support on typing English.

But I am seeing the Language change on Taskbar.

Language Change Code
1st method

 foreach (InputLanguage lang in InputLanguage.InstalledInputLanguages) 
 CName = lang.Culture.EnglishName.ToString(); 
 if (CName.StartsWith("Chinese")) //"English" 
      InputLanguage.CurrentInputLanguage = lang; 

2nd Method

Thread.CurrentThread.CurrentCulture = new CultureInfo("zh-CN"); 
Thread.CurrentThread.CurrentUICulture = new CultureInfo("zh-CN");

I tried this with normal windows forms project and controls( Not Devexpress form) still the issue not solved.

If we change input language manually at Taskbar, I am getting Language selection option. The Issue is only
with language change from code.

Please give me a immediate advice


2 Years
Discussion Span
Last Post by clairestreb

My advice to you is to:
1. Read the standard documentation, which clearly states that ...CurrentCulture = new CultureInfo(...) "is a per-thread setting that determines the default formats for dates, times, currency, and numbers, the sorting order of text, string comparisons, and casing. The CurrentCulture property is not a language setting." (https://technet.microsoft.com/en-us/subscriptions/se513yha%28VS.71%29.aspx)
2. Find as much documentation as you can and try the examples they provide before posting half-baked code and asking for immediate advice.
3. Read this article, because it provides the information you seek: "How to Localize Windows Forms and Change the Language at Runtime" http://www.dotnetcurry.com/showarticle.aspx?ID=174

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.