Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML input in Hindi or other non-english languages (Mostly Indian)

Tags:

html

input

hindi

I want to take user input in Hindi in a HTML form. How do i go about it?

I tried setting the font-family for the <input /> to some hindi font. But that doesn't work. Is there any other way of doing it?

Even embedding Google Transliterate or something similar will do. But i need to store the data entered into a MySQL Database.

PS: I am using PHP to do the server side stuff.

like image 785
varun1505 Avatar asked Jan 27 '26 14:01

varun1505


1 Answers

Although from your question it's not clear what you are trying to do. But for the sake of this answer I'm going to assume that you want users to see hindi characters as they type with their keyboard. In that case changing font is not going to help. Changing font has nothing to do with what characters you type on keyboard and what characters you see on screen.

If you want to let users type hindi character with their QUERTY keyboard then you need to embed something like google transliterate.

Here is the developers documentation on how to do it

https://developers.google.com/transliterate/v1/getting_started

Hope it helps.

like image 181
sublime Avatar answered Jan 29 '26 04:01

sublime



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!