Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am developing a WPF based application where I need to accept data in local language. I was able to do the same with google IME in win forms but it is not working in WPF.

I understand that the IMEmode property is useful with windows.form based application only but is there any way to input data in local language in a WPF based application.
Posted

I encountered the same problem. It works fine in WinForm application in both XP/Win7. But it only works for Wpf in Win7.
 
Share this answer
 
IT will work with code below , example for Japanese

C#
foreach (System.Windows.Forms.InputLanguage lang in System.Windows.Forms.InputLanguage.InstalledInputLanguages)
               if (lang.LayoutName == "Japanese")
               {
                   System.Windows.Forms.InputLanguage.CurrentInputLanguage = lang;
                   InputMethod.Current.ImeState = InputMethodState.On;
               }


or simple set in xaml

HTML
InputMethod.IsInputMethodEnabled="True" InputLanguageManager.InputLanguage="ja-JP"
 
Share this answer
 
v2
Comments
Richard MacCutchan 18-Sep-15 6:25am    
This question is more than 5 years old. Please do not trawl for old questions just to post answers.
duyanhphamkiller 6-Jan-16 22:21pm    
there isn't any answer, i post it and hope it will help some one. and trawl for old questions is your thinking
Bravo Hex 20-Feb-17 2:38am    
Many thanks for your solution!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900