Hindi Website
Moderator: General Moderators
-
rajoo.sharma
- Forum Newbie
- Posts: 7
- Joined: Sat Nov 14, 2009 4:51 am
Hindi Website
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
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
Re: Hindi Website
What do you mean, if you visit your own site you can't manually enter text in Hindi?rajoo.sharma wrote:But I do not know how to get it by typing?
Can you do it on other (Hindi) sites?
-
rajoo.sharma
- Forum Newbie
- Posts: 7
- Joined: Sat Nov 14, 2009 4:51 am
Re: Hindi Website
yes, thats correct, I do not know how to get the input in Hindi, its basically transliteration I guess. Please check the following website:
http://www.webduniya.com/
and enter something in the search box, u'll see transliteration taking place. This has to be done using some javascript code, it can not be done by default just by specifying the UTF-8 charset.
Please correct me if I am wrong.
Regards
http://www.webduniya.com/
and enter something in the search box, u'll see transliteration taking place. This has to be done using some javascript code, it can not be done by default just by specifying the UTF-8 charset.
Please correct me if I am wrong.
Regards
-
rajoo.sharma
- Forum Newbie
- Posts: 7
- Joined: Sat Nov 14, 2009 4:51 am
Re: Hindi Website
Just check this website and it will open fine on your PC too. Type something in Search box and u'll see transliteration taking place:
http://www.webduniya.com
They are not using google API:
http://code.google.com/apis/ajaxlanguag ... on/#Single
They are using something else, although using google API could be best, I want to understand the implementation basics first.
http://www.webduniya.com
They are not using google API:
http://code.google.com/apis/ajaxlanguag ... on/#Single
They are using something else, although using google API could be best, I want to understand the implementation basics first.
Re: Hindi Website
Hmm interesting, I've never seen anything like that before 
Then again, I don't know squat about writing or translating Hindi, how do you 'normally' type text in Hindi? Do you need a special keyboard? (it is an alphabetical language, right?)
Then again, I don't know squat about writing or translating Hindi, how do you 'normally' type text in Hindi? Do you need a special keyboard? (it is an alphabetical language, right?)
-
rajoo.sharma
- Forum Newbie
- Posts: 7
- Joined: Sat Nov 14, 2009 4:51 am
Re: Hindi Website
Generally for this we install hindi font(s), in the word processor select the font and start typing, no need to install anything else.
But UTF-8 is something different, this encoding is supported by almost all the latest browsers including IE6. So the advantage is that there is no need to install additional fonts on client's browser.
Regards
But UTF-8 is something different, this encoding is supported by almost all the latest browsers including IE6. So the advantage is that there is no need to install additional fonts on client's browser.
Regards
Re: Hindi Website
Exactly how do you type? I mean, what keys or letters do you press? (and on what kind of keyboard?)rajoo.sharma wrote:Generally for this we install hindi font(s), in the word processor select the font and start typing, no need to install anything else.
Do you just press A, B, C etc on an English keyboard, and then in the word processor, अ ब क etc appears?
I don't think so.. UTF-8 is merely the encoding, which specifies how the characters are stored. No Hindi font = no displaying Hindi characters, regardless of whether how they are stored.But UTF-8 is something different, this encoding is supported by almost all the latest browsers including IE6. So the advantage is that there is no need to install additional fonts on client's browser.
-
rajoo.sharma
- Forum Newbie
- Posts: 7
- Joined: Sat Nov 14, 2009 4:51 am
Re: Hindi Website
yes, u said right, but for browsers, it is a javascript toolkit will do this tranliteration like this google API:
http://code.google.com/apis/ajaxlanguag ... on/#Single
http://code.google.com/apis/ajaxlanguag ... on/#Single
Re: Hindi Website
If you are using the code as above, it should be OK on modern browsers. Make sure the entire site is tagged properly so that any language will display properly.
I have make many documents in many languages other than English and all work fine for me.
I have make many documents in many languages other than English and all work fine for me.
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
-
rajoo.sharma
- Forum Newbie
- Posts: 7
- Joined: Sat Nov 14, 2009 4:51 am
Re: Hindi Website
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.
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.
Re: Hindi Website
I put the word chess on my chess site in a huge basket of languages. I also carefully used HTML lang tags on each so that it would be recognized correctly by a search engine.
I have seen many of the words used on Google Analytics which told me my effort was worth it.
So I believe in the usefulness of correct language designations of all web pages.
And yes I even used Hindi for the great nation of India who I am sure still likes chess.
I have seen many of the words used on Google Analytics which told me my effort was worth it.
So I believe in the usefulness of correct language designations of all web pages.
And yes I even used Hindi for the great nation of India who I am sure still likes chess.
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP