Saturday, May 22, 2010

How can we convert English language in to Hindi language in C and C++ programming?

Please give me the whole process to change english language in to Hindi Language. I am talking about the output of the C or C++ program. Means one person will write in english and output will come in hindi language.


Please tell me who we can do that.

How can we convert English language in to Hindi language in C and C++ programming?
I can tell you what you do in the Microsoft world.





When you build a program using MFC/DevStudio, you can create a separate resource only DLL that has the strings for all your messages in it. You build one with the messages in English and one in Hindi. Your installer code will have to allow the user to select the language and then coyp the correct version of the DLL into the install directory.








In your main program code, instead of coding a literal, (something of the form "This is a string.") you instatiante a CString and load it from the resource table.





The code looks something like this:





CString strMessage;





strMessage.LoadString(resourceID);





AfxMessageBox(strMessage);





The other thing that you have to remember to do is to build all of your code using the _UNICODE compiler flag. That way the compiler will use two byte wide characters for all of your CStrings.





You can check on Microsoft's web site for more information on this. Search under the topic "Internationalization".

clear weed

No comments:

Post a Comment