Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Languages that are read from right to left

 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

I am busy writing software that is going to be translated into 20 languages. Some of these languages are the ones that are read from right to left and I was wondering if anyone has dealt with the task of having the user enter characters in a textfield from right to left.

Simple setting the horizontal justification from left to a setting of right is not enough. Because when I type in "rachel" in a right justified text box it will appear as "rachel" but what I am requiring is that the textfield shows "lehcar" (the first typed character should appear on the right).

I know that I'm going to have to do this with key events on the textfields but I was wondering if anyone else has made software that copes with this.

Many kind regards,
Rachel
 
jefff willis
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no I haven't and I hope that I never have to.

However, I would hope that you don't need to write your own keystroke interpreter here.

Surely there must be an existing third party product that will do this for you.
 
Don Kiddick
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check out JTextComponent.setComponentOrientation(ComponentOrientation o)

D.
 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amazing Don you are everywhere!!


Thanks, I've had a look at that and it will work well. The pain is that I'm going to have to add that to the tables as well. At least it is a challenge!

Cheers,
Rachel
[ October 11, 2004: Message edited by: Rachel Swailes ]
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!