Click here to Skip to main content
15,038,237 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am having C# windows application. My client wants it to support for multi language entry based on application setting.

I tried to set InputLanguage.CurrentInputLanguage to kannada (Indian Language).
After doing this I am able to type in kannada but key board layout is diffent.
How to set keyboard layout.

If I type "Aravind" then it should show in kannada

What I have tried:

nputLanguage.CurrentInputLanguage
Posted
Updated 28-Jan-20 1:13am

Your app should not be changing the keyboard layout - that's a physical thing which is reflected in the setting of the hardware for the operating system and is not something the app should be altering. Your app cannot not unplug the keyboard and plug in a new one, can it? So why should it be changing the settings for the whole system?
   
It looks like you are on the right track; that class property can be taken a level further by asking for the LayoutName
InputLanguage.LayoutName Property (System.Windows.Forms) | Microsoft Docs[^]

You may also be able to use the InputManager in a similar way:
InputLanguageManager.CurrentInputLanguage Property (System.Windows.Input) | Microsoft Docs[^]

And here is just a general article that may be of assistance to you
C#: Get current keyboard layout\input language[^]
   

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