Hindi Website

Discussion in 'PHP' started by rajoo.sharma, Nov 14, 2009.

  1. #1
    Hello,

    I'm wondering how can I accept input in Hindi from my website's users?
    All I know about is:

    1. UTF-8 is the solution
    2. add the following to the HTML Page:
    <meta http-equiv="Content-Language" content="hi">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    3. MySQL database connection collation must be utf8_unicode_ci

    If I paste anything from a hindi website like webduniya.com in my page's textbox it displays it correctly.
    But I do not know how to get it by typing?

    Do I need to use some javascript library?

    Kindly suggest to achieve the same.
    Regards
     
    rajoo.sharma, Nov 14, 2009 IP
  2. szalinski

    szalinski Peon

    Messages:
    341
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Assuming your users are going to have Hindi-language keyboards then it shouldn't be a problem for them. If you want to use an English-lettered keyboard to type in hindi, then install it from the Regional and Language Options from the Control Panel in windows.
     
    szalinski, Nov 20, 2009 IP
  3. rajoo.sharma

    rajoo.sharma Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I finally used Google transliteration API, I think there is no other solution. Or if somebody is interested, he can develop his own transliteration API.

    An implementation can be seen on http://www.greyboxtechnologies.com/dreamland
    type something in the search box and when u press spacebar, it will be transliterated. I've used the same thing in the admin panel to enter the data, and it gets stored properly in my MySQL DB. This can be displayed on all modern browsers, no need to download any font, it can also be searched in the database, Zen-Cart's (The open source I used here) default search works fine on it.

    I'll be more than happy to help anybody looking for similar implementation.

    Regards.
     
    rajoo.sharma, Nov 27, 2009 IP