Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0
how to change keyboard layout to arabic through c# coding
Posted 20-Jan-13 19:31pm
sai sagar1.9K
Comments
Sergey Alexandrovich Kryukov at 21-Jan-13 1:41am
   
System-wide or in your application only?
—SA
sai sagar at 21-Jan-13 2:26am
   
input for my application
Sergey Alexandrovich Kryukov at 21-Jan-13 2:33am
   
OK, please see my solution.
—SA
d@nish at 21-Jan-13 2:21am
   
I deleted your other question. It's similar to this one but just with some more description. Edit this question instead.
sai sagar at 21-Jan-13 2:25am
   
in case of disabling language bar it shows English as input. but i need arabic.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

My best advice would be: don't touch it. The user knows better what keyboard layout to use and when. Besides, you will badly hurt the user who want to use their own layouts for some language.
 
My second advice would be: at least, don't even think about switching of the system-wide switch. If you really need to switch the keyboard by your code, switch the input language instead, only for your application. This is how:
http://blogs.msdn.com/b/snippets/archive/2008/12/31/how-to-change-input-language-programmatically.aspx[^].
 
But I still think that not doing anything is much better. Remember, Arabic language is very popular; and the Arabo-Persian script is even more popular, so it is supported by default by nearly all modern systems. No need to add anything else to it. Even I, barely understanding just 2-3 Arabic words, personally used to write the text in this script for software testing purposes. For me, it was quite difficult, but for your customers… Smile | :)
 
—SA
  Permalink  
v2
Comments
sai sagar at 21-Jan-13 3:31am
   
ya its working fine. but it works after installing Arabic language from Control panel. but i want arabic text without installing from control panel. when user entered into my application then only arabic keyboard enable. it is desktop application(winform application). so in case of user not installing or removing language bar then it won't works.
Sergey Alexandrovich Kryukov at 21-Jan-13 3:39am
   
You did not say anything about installation. I don't know how to perform installation, but could find out. Do it if you want.
 
I would strongly, very strongly discourage to do so. Application should never touch installations (unless they are special system utilities). This is unfair to the user, because this is enormously intrusive. Enormously. Normal experienced users will deny using your products once they learn that you are doing such things.
 
OK, are you going to accept this solution (green button)? It works, as you say.
—SA
sai sagar at 21-Jan-13 3:47am
   
as per your above answer how can i change system language without installing arabic language from control panel.
Sergey Alexandrovich Kryukov at 21-Jan-13 4:00am
   
Didn't I answer above. The user should do it. If you disagree, I want to see how you do it. And this will be clear and total abuse.
And after all, why Arabic? The normal solution is this: your application supports any language the user installs...
—SA
sai sagar at 21-Jan-13 4:08am
   
for example user not installed arabic language from region and language settings then what happened? it always shows English only.
Sergey Alexandrovich Kryukov at 21-Jan-13 10:50am
   
No. Why? Switch languages in application.
And what do you mean by "show", exactly?
—SA

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

  Print Answers RSS
0 OriginalGriff 239
1 Sarvesh Kumar Gupta 185
2 George Jonsson 154
3 ArunRajendra 144
4 Richard MacCutchan 140


Advertise | Privacy | Mobile
Web04 | 2.8.140709.1 | Last Updated 21 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid