3

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.

4

1 回答 1

5

尽管从您的问题来看,尚不清楚您要做什么。但是为了这个答案,我假设您希望用户在使用键盘键入时看到印地语字符。在这种情况下,更改字体将无济于事。更改字体与您在键盘上键入的字符以及您在屏幕上看到的字符无关。

如果你想让用户用他们的 QUERTY 键盘输入印地语字符,那么你需要嵌入类似谷歌音译的东西。

这是有关如何执行此操作的开发人员文档

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

希望能帮助到你。

于 2014-04-01T18:55:21.107 回答