Results 1 to 3 of 3
I want to do a translation on a sentence that a user types in, then translate it to other language
I got a database of words translation.
But i don't ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 04-11-2003 #1Just Joined!
- Join Date
- Mar 2003
- Posts
- 10
Array
I want to do a translation on a sentence that a user types in, then translate it to other language
I got a database of words translation.
But i don't know how to do an array.
if ic an store all the string from the user input, and store it in an array, i can use a loop to translate each words and print them all as a sentence in another language.
any idea?
Thank you
- 04-11-2003 #2Just Joined!
- Join Date
- Apr 2003
- Location
- Australia & England
- Posts
- 75
What language are you using?
There are a million tutorials on the net explaining how arrays work for whatever language, but they are generally all the same. I'll do a java example. Are you also sure you want arrays, or are you happy with a collection API?
Code:String[] wordList = {"hello", "mr", "jones"}; StringBuffer translatedSentance = new StringBuffer(100); for (int i = 0; i < wordList.length; i++) { String translatedWord = wordList[i]; translatedWord.translate(); translatedSentance. append(translatedWord); }
- 04-11-2003 #3Linux User
- Join Date
- Nov 2002
- Posts
- 420
nonono, i'm trying to write a shell program to translate anEnglish sentence into French, i got the french dicionary called french.cat, but how do i set an array to store all the words inside a sentence that the users puts in and then use a lopp to translate them all?


Reply With Quote
