Click here to Skip to main content
15,912,932 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
May i know how to run my application when user input language change in language bar?


:)
Posted

1 solution

Usually, you don't need to do anything.

Normally, all .NET controls works with Unicode, so there is no problem, everything will work with any language, except, say Alt-<character> accelerators: if they were written in English, they will remain in English, not in other language (but the user is hopefully not blind).

There is only one problem that cab be essential: languages with left-to-right vs. right-to-left flow of characters (notably Arab and Hebrew.) In simple controls, again, this is not a problem; the user can even mix left-to-right vs. right-to-left fragments in a single text. However, when a thorough symmetry between left and right is needed, it can be done perfectly (for example, if the text is left-aligned, for Arab it should become right-aligned).

To perform perfect reflection fully automatically, there is a System.Windows.Forms.ControlControl property RightToLeft which can accept values Yes, No, Inherit.

For WPF it is the property FlowDirection, it takes values LeftToRight, RightToLeft.

These two properties for System.Windows.Forms and WPF can be changed programmatically during run time.

For some Easter Asian languages (such as Japanese Katakana and
Hiragana) there is a special text-input program IME and support via the property System.Windows.Forms.Control.ImeMode.

The question title mention Input Method Editors, but the text of the question asks about the change of input language in the input bar which is something different: it does not mean using IME, for vast majority of languages it simply switches input languages from the list selected in the system's language settings, which basically selects different keyboard layout.

As any character can be typed regardless any specific layout (with Character Map application, for example), it's the best to do nothing and leave the input method entirely to the user and OS.
 
Share this answer
 
v3
Comments
Sergey Alexandrovich Kryukov 14-Jan-11 0:58am    
Updated (clarification: which API for WinForms, which one for WPF)
Sergey Alexandrovich Kryukov 16-Jan-11 18:22pm    
Thank you for accepting the answer. Would you vote as well?

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