开发者

How to convert english letters to other languages using vb.net

Is there any way to convert to english words to any othe开发者_StackOverflow社区r languages as it typed.

for example, if i type "sekar" in a text box it should be converted to "tamil" language.

How can i do this in .net? Thanks


Getting a Unicode font for most well-known writing systems is not difficult. The hard part of transliteration is mapping a sequence of Unicode characters representing a word or phrase in one language, to another sequence of Unicode characters representing the same sequence of sounds in another language. This requires an algorithm that knows something about the sounds in both languages, taking context into account. It is not a simple substitution process that can be defined by a table. For example, in English, the digraph "ch" can make three different sounds:

ch (ச)  as in chin
sh (ஷ்) as in chiffon
k  (கே) as in character 

The above transliterations are compliments of Google. I have no idea if they are correct. Nevertheless, the point is that you have to look at the entire English word to know how to transliterate the first two letters in each case. It is no surprise, then, that Google's transliteration service does one word at a time. Each time you enter a space, it transliterates the preceding word. It works with a number of target languages, including Tamil. You can try it out here: http://www.google.com/transliterate/

They also have an API at http://code.google.com/apis/language/transliterate/overview.html, but I'm pretty sure that it makes AJAX calls to Google.

They also have a downloadable input method editor: http://www.google.com/ime/transliteration/ that can be used offline, once installed. However, it would not be an integral part of your application, and would have to be installed separately.


Use a translation service, e.g. the google language api


Yopu have to use a parser to change the langugae, if it is a web application you can easily handle it with Javascript (let me know if it is webbase)

If it is windows application you have to write your own parser (or use available ones like google). Note that if it is windows base user may have the keyboard so that you have to force user to use a single (english) keyboard and then chagne the words as long as your user pressing words ( in OnTextChanged event)

To write you own parser, you can get the char (e.char) and change it in a switch like this

switch(yourchar)
  Case 'a': '?'; break; // your desire char
  Case 'b': '?'; break; // your desire char
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜