Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Arabic text box

I have developed a web site: Some fields are entered in English while others are entered in Arabic language.

Now i wanna simplify the input operation for the user and want Arabic textbox as a DLL.

I have one but it works only with IE - not with firefox or google chrome ..

thanks so much..

How to enforce the user to write in Arabic? I mean moving the cursor directly without (ALT + SHIFT) keys every time when trying to change the language... If there is any way, property , DLL or what ever to do that...

like image 965
Anyname Donotcare Avatar asked Oct 24 '10 13:10

Anyname Donotcare


1 Answers

You could use this mature javascript library that works fine on firefox and IE, just add an attribute like lang='fa' or lang ='en' to your textbox and you're done, sure you can tailor it for your usage.

it's in persian and you can translate it with google to read the page.

I've done the adding attribute in client code and it's like this

 <script type="text/javascript">
                $().ready(function () {
                    $("input,textarea").each(function () {
                        $(this).attr("lang", "fa");
                    });
                });
  </script>
like image 186
Jahan Zinedine Avatar answered Sep 28 '22 06:09

Jahan Zinedine