Can we Translate english into hindi?
I want to translate english to hindi but emualtor shows boxes ? help me...
final TextView textV = (TextView) findViewById(R.id.textView1);
textV.setTypeface(Typeface.createFromAsset(getAssets(),"K010.ttf"));
try{
Translate.setHttpReferrer("www.some.com");
String str1=Translate.execute("love", Language.ENGLISH, Language.HINDI);
textV.setText(str1);开发者_高级运维
still i am getting boxes.....help me
Emulator shows boxes...may mean that the required font support is not present on your machine...please check if the Hindi font has been installed... But I did not understand the need for you to use the webView.loadDataWithBaseURL()...this would not do the translation I think...This will just try to load the given data into the WebView...and may be as the Hindi font is not supported the boxes are being displayed...
Are you developing kind of translator application or web page? where you type English in one TextView and select the langauge to which it has to be translated and the press an buttons "Translate"...and the translated string will be displayed in other TextView...
精彩评论