File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Arabic letters in Text object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Arabic letters in Text object" Watch "Arabic letters in Text object" New topic

Arabic letters in Text object


Joined: Jul 24, 2001
Posts: 17
Arabic letters in Text object
I want to create a web pages which has to show the mother language the user clicks. For eg. French, German, Arabic. If a particular language is selected then all web pages should be in that language.
I want to know is it possible to make a text field object is made to enter Arabic character and is it possible to make it accept it from right to left in typing.
Can any one help me. I am not sure how browser will support it.
Thanks and Regards
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

You're pretty much dependent on whether the user's particular browser wants to support that feature, although there's a server-side element as well, in that the browser and server can negotiate NLS support. Apache has pretty good docs on how this can be configured - I haven't studied what might be in any J2EE servers, but I did notice that there's a setLocale() method for serlvet responses to allow for proper formatting of dates, currency, large numbers, etc. (this also sets the charset in the content-type header).
You'll probably also want to pay attention to the language-code and charset options of the FORM tag - this is where you'd have to let the browser know what to do with the input tags as far as selecting character sets and directionality (if the browser supports them).
You might also want to snoop the html generated by Arabic websites to see what they're using.
Finally, don't forget that if you are persisting the data, make sure your DBMS supports NLS and is set up to do so!
Good Luck (or maybe "hattan sa3id"!)

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Arabic letters in Text object
It's not a secret anymore!