aspose file tools*
The moose likes Java in General and the fly likes Convert English word to arabic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Convert English word to arabic" Watch "Convert English word to arabic" New topic
Author

Convert English word to arabic

Sarath Koiloth Ramath
Ranch Hand

Joined: May 07, 2008
Posts: 52
Hi freinds,

Is it possible to get arabic word for correspoding english word.The English word entered by the user might be a name,first name or a lastname.So i need to show these name is arabic.Please help me to solve this issue

Thanks in advance.


J 4 Java
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36464
    
  15
What's the Arabic for Bear?

You can get a simple translator with a Map<String, String>.Well, I heard about 40 years ago that the Egyptian newspaper Al Ahram meant "the Pyramid."

Anything more than that, and we are running into very complicated programming. As I said, what's the Arabic for Bear?
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4634
    
    5

I don't know Arabic, but I looked at this years ago, and its quite complex. a lot of single English words turn into phrases in Arabic. And depending on context, an English phrase turns into different phrases, so one-to-one transliterations don't do well.
Sarath Koiloth Ramath
Ranch Hand

Joined: May 07, 2008
Posts: 52
we cannot predict the input from the user.what i want is to convert the user input(english word) into an arabic font.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36464
    
  15
Do you simply want to change the English letters into Arabic? You could try mapping from English letters to Arabic, but remember that some English letters are read in groups, eg SH, TCH, STR (as in construction and instrument) and that is difficult to transliterate.
Sarath Koiloth Ramath
Ranch Hand

Joined: May 07, 2008
Posts: 52
Thanks Ritchie for your reply...I am not quite sure how to solve this issue.can you suggest any idea to takcle this.I repeat my issue,When i finish typing a name (engligh) in a textbox,i want to fill the corresponding arabic word (automatically) in another textbox.

Can you suggest the best way to solve this....
[ October 27, 2008: Message edited by: Sarath Koiloth Ramath ]
susha bhogs
Greenhorn

Joined: Mar 29, 2006
Posts: 6
I think you can achieve thru GWT (using Goole Language API)

Refer to the following link -

http://code.google.com/apis/ajaxlanguage/documentation/
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4634
    
    5

Originally posted by Sarath Koiloth Ramath:
When i finish typing a name (engligh) in a textbox,i want to fill the corresponding arabic word (automatically) in another textbox.


Unlike English, Arabic uses different glyphs for the same letter depending on context. English has two, Upper Case and lowercase. Arabic has at least four. There are rules for things like when does a vowel get displayed as a separate character, and when its shown as dots over or under other characters.

Its not trivial.

I don't think you can do it as simplistically as you are suggesting, or hope.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18115
    
    8

Let's have an example. Show us what you would want to display if I keyed my name (Paul Clapham) into your text box.
Sarath Koiloth Ramath
Ranch Hand

Joined: May 07, 2008
Posts: 52
Thanks for the valuable replies.

hi Paul,

When i input your name Paul Clapham.I need to display as بول كلافام.paul,its your name in arabic.I had done some what with google language tranlation.but some words is cannot be converted.Now i am using it.please tell me if there is any other suitable option.

Thanks you.....
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18115
    
    8

Yes, that looks similar to what I get from Google Translate too. But I don't know if it's correct because I don't know Arabic. Do you know Arabic? Because if you don't, you're going to have a lot of difficulty with this project.

I'm assuming that you want something that if you showed it to a speaker of Arabic, he would recognize it as my name. I wouldn't trust an automated translator to do that; for example if my name were Brown, it might convert that into the Arabic word for "brown". I'm assuming you don't want that.
Matteo Di Furia
Ranch Hand

Joined: Jun 20, 2008
Posts: 102
I'd also not count on Google translator (nor on any other translation tool), don't know for other languages, but the Italian <--> English Google translator is quite stupid, even if you try with not so difficult phrases.
I don't even want to think about Arabian <--> English !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Convert English word to arabic
 
Similar Threads
Displaying Arabic characters on iWS 6
writing arabic text in a file....
translate english language to arabic
How many languages do you speak ...
Developing website in English and Arabic