I am working on a website in which users should fill some fields in different languages. I don't want the users to change their writing language using Alt+Shift key combination but rather i want the input language to be changed automatically to either Persian or English.
Is there any way to do that?
1- Download Farsi type java script file
After you downloaded the file, attach it to the head section of your html page.
<Head>
<script src="farsitype.js" type="text/javascript"></script>
<!-- Other tags are omitted to reduce complexity -->
</Head>
Now all you have to do is to create a text box and set its Lang attribute to "fa-IR".
<input type="textbox" name="text1" Lang="fa-IR" />
or
<asp:TextBox ID="txt_name" runat="Server" Lang="fa-IR" />
Load your page and it's done!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With