473,624 Members | 2,165 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing the default language in specific textBox

Hi,

my user default language is hebrew but in some cases i want that the default
language in specific textBox will be english (i mean that when the user will
hit the 'T' key he will get a T in the textBox and not the parallel letter in
hebrew) what is the best way to do it? i can always check which letter the
user hit and then change it to the english parallel in the keyboard, but i
don't think this is the best way.

thanks,
Gidi.
Nov 17 '05 #1
4 7477
Gidi,

To my knowledge, the culture/language settings are specific to the
thread, not to individual controls. Because of this, you would have to do
exactly what you mentioned, which would be to monitor the keys and provide
your own mappings between the keys and the letters displayed by the textbox.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Gidi" <sh*****@hotmai l.com.dontspam> wrote in message
news:2A******** *************** ***********@mic rosoft.com...
Hi,

my user default language is hebrew but in some cases i want that the
default
language in specific textBox will be english (i mean that when the user
will
hit the 'T' key he will get a T in the textBox and not the parallel letter
in
hebrew) what is the best way to do it? i can always check which letter the
user hit and then change it to the english parallel in the keyboard, but
i
don't think this is the best way.

thanks,
Gidi.

Nov 17 '05 #2
Hi Nicholas,

I tried to that and i'm having a problem, i can't make the textBox to
display the text right.
this is my function:

private void neshek_num_txt_ KeyUp(object
sender,System.W indows.Forms.Ke yEventArgs e)
{
if(e.KeyCode!=K eys.Enter && e.KeyCode!=Keys .Alt && e.KeyCode!=Keys .Tab)
{
string temp=neshek_num _txt.Text.Trim( );
string let="";
int len=temp.Length ;
string new_line="";
if(len>0)
let=mf.Change_L angauge(temp[len-1].ToString());
for(int i=0;i<len-1;i++)
new_line=new_li ne+temp[i].ToString();
new_line=new_li ne+let;
neshek_num_txt. Text=new_line;

}

}

the function Change_Langauge () gets the hebrew letter and returns the
parallel letter on the keyboard.
my problems are:
1. sometimes it takes the computer lots of time to respond (like it gets
into a loop) and only by hiting ctrl+akt+del releases it.
2. if i pressed C and Z i get only the hebrew letter of Z.

what is wrong in my function? how can i make the cursor to be at the end of
the line?

Thanks,


Nov 17 '05 #3
You can detect an English character if the current language setting is Hebrew. What you can do - is
when the textbox gets focused, change the keyboard to English, and back to Hebrew (or better yet save
and restore whatever the user had) on exit.

I have English, Russian, Greek, German, and Arabic installed on my system and many applications
that work in multiple languages.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programmin g is an art form that fights back"

Get your ASP.NET in gear with IntraWeb!
http://www.atozed.com/IntraWeb/
Nov 17 '05 #4
Thanks, but how can i do it?

"Chad Z. Hower aka Kudzu" wrote:
You can detect an English character if the current language setting is Hebrew. What you can do - is
when the textbox gets focused, change the keyboard to English, and back to Hebrew (or better yet save
and restore whatever the user had) on exit.

I have English, Russian, Greek, German, and Arabic installed on my system and many applications
that work in multiple languages.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programmin g is an art form that fights back"

Get your ASP.NET in gear with IntraWeb!
http://www.atozed.com/IntraWeb/

Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

63
5854
by: Tristan Miller | last post by:
Greetings. Do any popular browsers correctly support <q>, at least for Western languages? I've noticed that Mozilla uses the standard English double-quote character, ", regardless of the lang attribute of the HTML document. Will any browsers render German-style quotes or French-style guillemots for lang="de" and lang="fr", respectively? Regards, Tristan
1
2637
by: Raphael Iloh | last post by:
Hi all, I have a Web Setup Project and would like to change the installation path from the default (i.e. C:\Inetpub\wwwroot\) to some more particular path (e.g. c:\myfolder\). Any ideas on this will be appreciated. Regards, Raphael
0
1639
by: Gidi | last post by:
Hi, i'm writing this question again, since i didn't get an answer in the reply i wrote, i hope it's ok. My user default language is hebrew and in some specific TextBoxs i want that the default language will be english. I asked here and the answer i got was that the best way to do so, is by getting the Hebrew Letter and Change it to it's parallel English letter on the keyboard. i didn't such a function (with switch and case) but i'm...
1
2703
by: Gidi | last post by:
Hi, I have a TextBox, and i want that when ever it gets focused i will call an event who preform like ALT + SHIFT (meaning, change the language of the textbox). What i actually need is, to make my textBox to always write in English, no metter which language is configured in the Windows, on this specific TextBox i need always english. Is it possiable ?
3
1291
by: ABC | last post by:
How to set first focus on specific textbox?
3
2153
by: Gidi | last post by:
Hi, I've a form with few TextBoxes and in all i'm writing in language A except one which i want to write in language B (both A and B are installed on my PC). how can I make the specific textBox to write in language B when it has the focus and get back to language A when it loses it. I tried to send Alt+Shift and it's working when i move from one TextBox to the other, but then when i leave the form (OnClosing i.e.) i'm stuck with...
2
1385
by: cyberco | last post by:
Using: WM5 PPC, .NetCF 2, C#, Visual Studio 2005 OK, I figured out how to add resources.resx files for different languages/cultures for both my Frames and my project at large. But how can I deploy a version of my application that uses the non-default language? My application will run on English (also the default of my project) versions of WM5, but my application should be in the other language I specified.
3
1271
by: menakavenkatesh | last post by:
i want simple coding for changing fontsize of the texbox
6
53064
by: aeris | last post by:
Hello, I'm a beginner of using C#. I'm creating a window application, May I know how to clear the default text on textbox when I click directly on the textbox? For example, the txtBox has the words "", so how to make the words all clear when user click on the textbox ? Sorry for disturbing you all, can someone provide me the codes please? Thanks,
0
8172
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8677
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8620
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8474
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7158
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5563
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4079
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1784
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.