Click here to Skip to main content
13,043,145 members (57,778 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I need c# code for converting English alphabet to hindi. If somebody type "M" then it should display hindi "MOH".Similarly ,if we type ENGLISH "MAA" then it should display as "MAA" in Hindi alphabets. Please help me.
Thank you for your kind attention.
Posted 2-Jun-11 21:32pm
Shradha Gupta 20-Mar-13 4:21am
I need a code in .net to convert English language to Marathi. If anybody know then please reply.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Create a look-up table in the form of array of string. Populate it from some text file, for example. The value will be the transliteration ([^]) string of some English character. This way, you will have a function using this array.

But think about it: why not using the standard IPA ([^])? As far as I know it covers both English and Hindi well (I know some languages it does not cover well, but with Hindi it should do).

OK, it's up to you. Back to our function:

string[] TransliterationTable = new string[26]; //I assume lo- and hi-case letters are transliterated in the same way
//Populate TransliterationTable from file...
// instance method of the same class
// where TransliterationTable is declared:
string Transliterate(char English) {
   // pre-condition to guarantee: all English chars should be in the table,
   // other code points should not be used in call:
   bool upperCase = char.IsUpper(English);
   English = English.ToUpper();
   int index = (char)English - 0x41; //minus capital English 'A'
   string result = TransliterationTable[index];
   if (upperCase) //assume transliterations are in lower
      result = result.ToUpper;
   return TransliterationTable[index]; 
//one more in this class:
string Transliterate(string English) {
   System.Text.StringBuilder sb = new System.Text.StringBuilder();
   foreach(char eng in English)
   return sb.ToString();


SP 24 3-Jun-11 7:52am
Hi Sakryukov, I have one doubt regarding your second link. How can it be possible to Transliterate English to Hindi. Quite confusing. I have a knowledge of scripts of 11 Indian language and for last 5 year, I am working in Language & Technology. Transliteration of Indian languages is done by me but seriously I don't understand the second link. Please explain :) Thanks in Advance.
SAKryukov 5-Jun-11 22:53pm
"How can it be possible to Transliterate English to Hindi". I'm absolutely agree with your concern and wanted to question OP about it. It would make sense to approximately transliterate, say, Russian into Hindi, but not English, as transliteration letter-by-letter would loose the meaning of the word, as in English orthography spelling if too far from phonetics. I merely shown how to implement the OP's procedure. Actually, it's possible to recognize transliterated English text, but it rather has humorous effect sometimes used in literature.

Now, about IPA. There is nothing to explain. The second link has nothing to do with transliteration at all. In my second link I just questioned the transliteration itself. How it's useful? (See my notes above.) From as much as know, it's possible to conduct both English and Hindi phonetics using IPA. Am I right? I understand the value of IPA system (I wish it would be wider; some languages don't feet in the IPA set), but I fail to understand the value of transliteration between scripts and languages. Here I would ask you: can you explain it? In my experience, such transliteration is nothing more then "foreign language for the lamers". Is it not?

Thank you.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I think you want to create a transliteration logic.
For this first some mapping of word is to be done by using array.
for example:अ is mapped with a
आ is mapped with aa
क is mapped with ka
1)after that you have to implement some logic to check if aa comes after consonant than it should convert it to matra.
manabjn 8-Jun-11 10:39am
Thank you for your help.Please tell me how to mape आ with aa and so on.
Rate this: bad
Please Sign up or sign in to vote.

Solution 4

Use the character equivalent for the letters and you need to write some code for combining a consonant and a vowel. Use Unicode encoding.
Rate this: bad
Please Sign up or sign in to vote.

Solution 6

Hi All
my self pramod deotalu m doing english to hindi conversion without using google translation.. please check hope it will help you.
Pramod Deotalu

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 20 Jun 2014
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100