Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
683 views
in Technique[技术] by (71.8m points)

c# - 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...

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...