How would I make a translator similar to google translate? I know english, french, and japanese... I just need the code to detect the words without detecting every phrase possible you could write.
>"I know english, french, and japanese"
So I'm not the only one...? *-*
Okay, so make the program do this:
-Ask for a sentence in one language
-Detect the language
-Ask for the language you want to translate to
-Save every word from the sentence in an array
-Translate every word in the array
-Rebuild the sentence
It shouldn't work very well; Japanese and English are very different...
To answer your question, to detect words, you have to use commands like MID$(), LEN(), and a FOR loop. You should make it scan the sentence from left to right: whenever it encounters a space, make it save in an array everything it scanned between the last space and the one it just found. I know it sounds complex (and it is), but if you can understand three languages, you can understand this. :P
Wait; you wouldn't want it to translate sentences?
...At all?
WELL, 'looks like my program will take much less time to finish. I should release it tonight (if you don't need it to translate sentences, of course. That is much more complex, because it requires grammatical rules and such).
[YKKNX4J6] There it is!
Err, I really only did the necessary.
I couldn't find out how to make it detect which word is the subject and which one is the object, so sentence translation in Japanese gets messy very quickly. I hope you make attempts on your own and find out how to do it for me. This project is getting interesting.
I told you already lol; I didn't understand how to find the subject in a sentence so I purposely forced the object in the japanese sentence to be "ringo". I'm pretty sure that if we think hard enough we could find out how. (But for now, I'm taking a break. You should try to add your own stuff to the translator to improve it!)